URL encode & decode
Uses encodeURIComponent (safe for query values). Not a full URL parser.
How to use the URL encode & decode
What does the URL encode & decode do?
Encode or decode text with encodeURIComponent and decodeURIComponent; It applies this page-specific rule: encodeURIComponent escapes almost every reserved character, including & .
Which inputs does this tool use?
To encode or decode text with encodeuricomponent and decodeuricomponent, enter Plain, Encoded; keep every value in the same example; select Encode → when the values are ready; Start with a familiar case covered by this rule - encodeURI is looser: it leaves URL punctuation intact so you can encode a whole URL without breaking its structure - so the expected result can confirm the settings.
How should the tool result be read?
For a result intended to encode or decode text with encodeuricomponent and decodeuricomponent, encodeURI is looser: it leaves URL punctuation intact so you can encode a whole URL without breaking its structure; read encoded together with the original plain rather than as an isolated answer, and confirm that its units or structure match the intended use.
encodeURI vs encodeURIComponent?
When the goal is to encode or decode text with encodeuricomponent and decodeuricomponent, this page is component encoding.
Plus signs?
When using the page to encode or decode text with encodeuricomponent and decodeuricomponent, this uses %20 for spaces, not +.
Limits and accuracy
When using this tool to encode or decode text with encodeuricomponent and decodeuricomponent, invalid % sequences cannot be decoded; check the result in its intended destination before relying on it for important work; keep plain until the output has been checked in its intended destination. For a repeatable check when you need to encode or decode text with encodeuricomponent and decodeuricomponent, record Plain alongside the final output and selected options. A known example using plain can confirm how the page will encode or decode text with encodeuricomponent and decodeuricomponent. While trying to encode or decode text with encodeuricomponent and decodeuricomponent, read the status message before copying or downloading because it can identify an incomplete or unsupported Encoded.
How this works
encodeURIComponent escapes almost every reserved character, including & ? / =. That is what you want when a value goes into a query string so it cannot split the URL.
encodeURI is looser: it leaves URL punctuation intact so you can encode a whole URL without breaking its structure. That comparison lives on its own page.
Invalid % sequences cannot be decoded. The page says so instead of throwing a silent error.
Frequently asked questions
encodeURI vs encodeURIComponent?
This page is component encoding. Open the compare tool if you need both side by side.
Plus signs?
This uses %20 for spaces, not +. Form encoding is a different convention.
Unicode?
Yes. Non-ASCII becomes UTF-8 percent-bytes.