Escape a single URI component – a query value, path segment or fragment – so reserved characters like ampersand, equals, question mark, slash and hash cannot break the surrounding URL. Strict RFC 3986 mode also escapes the exclamation mark, apostrophe, parentheses and asterisk.
Show calculation steps
Processed privately in your browser — nothing you paste is uploaded, logged or stored.
How to use the URI Component Encoder
- Paste the single value you need to embed – a search term, a redirect target, a filename.
- Choose the standard: encodeURIComponent matches JavaScript exactly; strict RFC 3986 additionally escapes four characters that JavaScript leaves alone.
- Click "Encode component" and paste the result into your URL.
Frequently asked questions
How is this different from the URL Encoder?
This tool always behaves like encodeURIComponent: it escapes every reserved character, including the colon, slashes, question mark, ampersand and hash. That is what you want for a value going inside a URL. The URL Encoder additionally offers a whole-URL mode that preserves those structural characters.
Why does strict mode escape the apostrophe, parentheses and asterisk?
RFC 3986 classifies those as sub-delimiters that may carry meaning in some schemes, but JavaScript’s encodeURIComponent leaves them unescaped for historical reasons. Strict mode closes that gap, which some server frameworks and signature schemes require.
I pasted a full URL and everything got escaped. Is that a bug?
No – it is the correct behaviour for this tool, and it is right when you are embedding one URL inside another (a redirect parameter, for example). If you simply wanted a valid version of that URL, use the URL Encoder in whole-URL mode. The tool warns you when it detects this situation.