URL Encoder/Decoder
Encode (encodeURIComponent) and decode (decodeURIComponent) URL query parameters.
FAQ
When do I need URL encoding?
When URL query parameters contain non-ASCII characters, spaces, or special characters (like &, =, #, %), you need to URL encode them, otherwise it may cause parameter parsing errors or request failures. Browser address bars also automatically apply percent-encoding to non-ASCII characters.
What's the difference between encodeURIComponent and encodeURI?encodeURIComponent encodes all special characters (including &, =, ?) in parameter values, making it suitable for encoding query parameter values. encodeURI only encodes illegal characters in the entire URL while preserving URL structure characters like &, =, ?, #, making it suitable for encoding complete URLs. In short: use encodeURIComponent for parameters, use encodeURI for full URLs.
Related guide
Base64, URL Escapes and Unicode Escapes, and Why None of Them Hide Anything
Base64 of a UTF-8 text, percent-escapes that leave a plus sign alone, and a Unicode converter that rewrites even the letter A — the three encode pages on this site are reversible by design, so the useful details are the boundaries: padding, plus signs, surrogates and which box the result lands in.