Back to home

URL Encode / Decode

Encode or decode with encodeURIComponent, encodeURI or form mode

Text
0 chars0 bytes0 lines
Encoded
The result shows up here
Which one:Use Component for a single query value, Full URL when the link is embedded in another URL, and Form for form posts or backends that read + as a space.

FAQ

When is URL encoding needed?

When a value contains spaces, non-ASCII text or reserved characters such as & = #, percent-encoding stops them being parsed as part of the URL structure.

encodeURIComponent vs encodeURI — what's the difference?

encodeURI keeps structural characters like : / ? #, so it suits a whole URL; encodeURIComponent encodes those too, so it suits a single query-parameter value.