URL Encoder / Decoder
Percent-encode or decode URLs and query strings instantly in your browser.
Component mode escapes reserved characters too (encodeURIComponent).
Related Tools
0 comments
How it works
Encoding uses JavaScript's built-in encodeURIComponent, which replaces every character outside the unreserved set (letters, digits, and - _ . ! ~ * ' ( )) with one or more %HH bytes from its UTF-8 encoding. Decoding reverses it with decodeURIComponent. Full-URL mode uses encodeURI / decodeURI instead, leaving reserved structural characters like : / ? # & = intact so a complete address stays usable. Everything runs locally — your URLs and tokens never leave the tab.
encodeURIComponent(" ") === "%20"
encodeURIComponent("&") === "%26"
Common use cases
- Safely embedding a value containing spaces or & into a query-string parameter.
- Decoding a copied link full of %20 and %3A sequences to read it.
- Escaping redirect URLs passed to OAuth or payment callback parameters.
Frequently asked questions
What is the difference between component and full-URL mode?
Component mode (encodeURIComponent) escapes reserved characters like : / ? # & = too, so it is right for a single query value. Full-URL mode (encodeURI) leaves those intact so an entire address stays valid. Use component mode for values, full mode for whole links.
Why does decoding sometimes show an error?
decodeURIComponent throws on malformed percent sequences — a lone % or %ZZ that is not valid hex. The tool catches that and tells you the input is not valid percent-encoding rather than returning broken text.
Does it handle Unicode and emoji?
Yes. Characters are encoded as their UTF-8 bytes, so accented letters, CJK text, and emoji round-trip correctly through encode then decode.