URL Encode

URL encode & decode

Percent-encode text for URLs or decode it back — choose component or full-URL mode. Private and instant.

▌ Input
▌ Output

Component vs full URL

When you put text into a URL — a search term, a parameter value — characters like spaces, ampersands and question marks have to be percent-encoded so they aren't mistaken for URL structure. Use component mode (encodeURIComponent) for a single value like a query parameter, which escapes &, =, ? and /. Use full URL mode (encodeURI) when you want to encode a whole address while leaving its structural characters intact.

FAQ

What's the difference between the two encode modes?
Component mode (encodeURIComponent) escapes everything unsafe in a single value, including & = ? and /. Full-URL mode (encodeURI) leaves those structural characters alone so a complete URL stays valid.
Why does my decoded URL show an error?
Decoding fails if the text contains a stray % that isn't part of a valid %XX sequence. Check for lone percent signs.

Related tools