URL Encoder/Decoder
Percent-encode or decode a URL or value with the URI, Component or Full method.
Encoding Methods Guide
- encodeURIComponent: Use for query parameter values (recommended)
- encodeURI: Use for full URLs (preserves /, ?, #, etc.)
- Full Encode: Encode all special characters
URLs can only carry letters, digits and a few symbols, so other characters become UTF-8 bytes written as % plus two hex digits. The tool uses the browser's encodeURIComponent and encodeURI, and your text is not sent anywhere.
The input https://ex.com/search?q=black cat&page=2 under each method:
| Method | Result |
|---|---|
| URI | https://ex.com/search?q=black%20cat&page=2 |
| Component | https%3A%2F%2Fex.com%2Fsearch%3Fq%3Dblack%20cat%26page%3D2 |
| Full | https%3A%2F%2Fex%2Ecom%2Fsearch%3Fq%3Dblack%20cat%26page%3D2 |
URI keeps the structure characters : / ? & = and encodes only the rest, which suits a finished URL. Component encodes the structure too, so use it for a single value. Tom & Jerry becomes Tom%20%26%20Jerry under Component, but under URI the & stays and a server would cut the search at Tom. Full also encodes dots and hyphens as %2E and %2D. Non-English letters become UTF-8 bytes under every method, so the Korean syllable U+AC00 is written as %EA%B0%80.
Decode tries decodeURIComponent first and falls back to decodeURI. Only %20 counts as a space, so change a form-style + to a space before decoding. If you still see %25EA, the value was encoded twice, so decode once more. A stray % like in 100% causes an error, and EUC-KR encoded values come out garbled because decoding assumes UTF-8.
To attach tracking values to a whole URL, the UTM Link Generator encodes each value for you.