What URL encoding does
URLs can only contain a limited set of characters. Anything else is percent-encoded: each byte becomes % followed by two hex digits. A space becomes %20, and é (two bytes in UTF-8) becomes %C3%A9. Letters, digits and - . _ ~ never need encoding.
Characters like / ? # & = have a structural meaning, so whether to encode them depends on where the text goes. That's why the tool has two encode modes.
Which mode to use
- Encode value: encodes everything except letters, digits and
- . _ ~, including/ : ? & =. Use it for a single query parameter value or path segment. It matches JavaScript'sencodeURIComponent. - Encode URL: keeps the URL's structure (
/ : ? & = #) and encodes only characters that can't appear in a URL, like spaces. Use it for a whole URL. It matchesencodeURI. - Decode: turns percent-encoded text back into readable text.
Example
Value: rock & roll / 2026 Encoded: rock%20%26%20roll%20%2F%202026 https://example.com/search?q=rock%20%26%20roll
If you encoded the value with Encode URL instead, the & would stay as is and the server would read roll as the start of a new parameter.
%20 or + for spaces?
Both appear in the wild. %20 is correct everywhere in a URL. + means a space only in query strings sent as HTML form data (application/x-www-form-urlencoded); in a path it's a literal plus sign. When in doubt, use %20.
Spotting double encoding
If you see %2520 in a URL, something encoded an already-encoded string: %20 became %2520. Decode once to check, and make sure each layer of your code encodes only raw values. To inspect each part of a URL, use the URL Parser.