URL Encode / Decode
Encode or decode URLs and query strings with percent-encoding.
Input
Output
About the URL Encode / Decode
Encode or decode URLs and query string parameters using percent-encoding. Characters like spaces, ampersands, and non-Latin letters cannot appear literally in a URL, so they are replaced with a % followed by their byte value — which is why a URL you paste into a chat sometimes turns into a wall of %20s.
How to use it
- 1 Choose Encode to make text URL-safe, or Decode to make it readable again.
- 2 Paste your URL or parameter value into the input.
- 3 Pick component encoding for a single parameter, or full-URL encoding to preserve the structure.
- 4 Copy the result.
What it does
- Two-way percent-encoding and decoding
- Separate component and full-URL modes
- Correct UTF-8 handling for non-Latin characters
- Query string parameter breakdown
Frequently asked questions
Is my URL sent anywhere?
No. Every calculation happens locally in your browser using JavaScript. Nothing you paste is uploaded, logged, or stored on a server, which makes the tool safe to use with production data, credentials, and customer records.
What is the difference between encodeURI and encodeURIComponent?
encodeURI preserves the characters that give a URL its structure — : / ? # & = — so it is for encoding a whole URL. encodeURIComponent escapes those too, which is what you need for a single query parameter value. Using the wrong one is a common bug: a parameter containing & will silently split into two parameters if you only used encodeURI.
Why is a space sometimes %20 and sometimes +?
Both appear. %20 is standard percent-encoding and works anywhere in a URL. The + form comes from the older application/x-www-form-urlencoded format and is only valid inside a query string. Decoders that handle one but not the other are a frequent source of mangled values.
Should I encode a URL twice?
Almost never. Double encoding turns % into %25, so %20 becomes %2520 and the receiving system decodes it into a literal "%20" string rather than a space. If your values are arriving with stray %25 sequences, something in the chain is encoding twice.
Which characters need encoding?
Anything outside the unreserved set of A–Z, a–z, 0–9, hyphen, underscore, period, and tilde. That covers spaces, all reserved delimiters when used as data, and every non-ASCII character, which is first converted to UTF-8 bytes and then percent-encoded byte by byte.