URL encode and decode
Encode with encodeURIComponent or encodeURI, and decode percent-encoding.
Nothing you type is sent. The work stays in this browser.
How to use it
- Paste the text to encode or the percent-encoded text to decode.
- encodeURIComponent escapes characters that would break a query value. encodeURI leaves URL separators alone.
- Decode uses decodeURIComponent and reports a URIError instead of returning a broken string.
Spaces become %20, not +. A form body that uses + for spaces will not round-trip through encodeURIComponent. The decode step treats + as a plus sign.
Already-encoded text encoded a second time will encode the percent signs. Decode once and look at the result before encoding again.
The work stays on this page.