URL Encoder
URL-encode and decode strings.
What is the URL Encoder / Decoder?
The URL encoder/decoder converts text into percent-encoded form and turns already-encoded strings back into readable text. URLs can only safely carry letters, digits, and a handful of symbols, so characters like spaces, non-Latin scripts, &, ?, and = must be rewritten as %XX hexadecimal codes for browsers and servers to exchange values without misreading them.
This tool uses the browser's built-in encodeURIComponent and decodeURIComponent functions directly. That means it is tuned for encoding a single query-parameter value: it escapes slashes (/), question marks (?), and ampersands (&) as well. This differs from encodeURI, which preserves overall URL structure, so this tool is exactly right when you are handling parameter values.
Every conversion runs entirely inside your browser and the text you enter is never sent to a server. You can safely paste a query string containing an API token or an internal URL, because nothing leaves your machine.
How to use
- Choose 'Encode' or 'Decode' mode at the top.
- In encode mode, paste your original text (including spaces, non-Latin characters, or symbols); in decode mode, paste an encoded string containing %XX sequences.
- The result appears instantly in the box below, and the copy button places it on your clipboard. If the input cannot be decoded, an error message is shown.
Frequently asked questions
- What is the difference between encodeURIComponent and encodeURI?
- encodeURI targets a full URL and leaves structural characters like /, ?, &, and # untouched. The encodeURIComponent function this tool uses is meant for encoding a single query-parameter value, so it escapes those characters too. When building a parameter value, encodeURIComponent is the correct choice.
- Why does one non-Latin character turn into several bytes like %EA%B0%80?
- Percent-encoding first converts a character to its UTF-8 bytes, then writes each byte as %XX. A single Korean or CJK character is usually three bytes in UTF-8, so you see three %XX sequences in a row. This is expected behavior.
- When does decoding produce an error?
- If a % is not followed by two valid hex digits (for example %ZZ or a lone %), or the byte sequence cannot be interpreted as UTF-8, decodeURIComponent throws and the tool shows an error. Check whether the encoded string was truncated somewhere.
- Is my input stored on a server?
- No. Both encoding and decoding happen purely in browser JavaScript, and no data is transmitted to or stored on any server.