URL Encoder & Decoder
Last reviewed on April 27, 2026.
Two modes. Component encodes a single value — a query parameter, a path segment — and escapes characters that have special meaning in a URL. Full URL is forgiving and leaves the structural characters (:, /, ?, #) alone, encoding only what would otherwise be ambiguous.
Why URLs need encoding at all
A URL has a strict grammar. Characters like ? separate the path from the query string, & separates one query parameter from the next, # introduces a fragment, and / breaks path segments apart. If your data contains any of those characters, the parser on the other end has no way to know whether you meant the structural meaning or the literal byte. Percent-encoding (%20 for a space, %26 for &) writes the literal byte in a form that survives the parsing rules.
Three modes, three jobs
Component
Equivalent to JavaScript's encodeURIComponent(). Encodes everything that has any reserved meaning. Use this for individual query-parameter values, path segments, and JSON values that need to ride in a URL. name=Bob & co. becomes name%3DBob%20%26%20co., ready to drop into ?value=....
Full URL
Equivalent to encodeURI(). Leaves the structural characters intact and encodes only spaces and other byte values that cannot appear literally. Use this when you have a complete URL with non-ASCII characters in it and you want to pass it as a single string somewhere. https://example.com/search?q=日本 becomes https://example.com/search?q=%E6%97%A5%E6%9C%AC while keeping the slashes, the ?, and the =.
Form data
For HTML forms posted as application/x-www-form-urlencoded. The wire format differs from component encoding in one important way: spaces become + instead of %20. The two are interchangeable to a properly written parser, but a few legacy systems require the + form. The mode here mirrors that convention.
The reserved set, in one table
Component mode escapes every character outside the unreserved set. Full URL mode leaves the reserved set alone.
| Set | Characters | Component | Full URL |
|---|---|---|---|
| Unreserved | A–Z a–z 0–9 - _ . ~ | Untouched | Untouched |
| Reserved (gen-delims) | : / ? # [ ] @ | Encoded | Untouched |
| Reserved (sub-delims) | ! $ & ' ( ) * + , ; = | Encoded | Untouched |
| Other ASCII | space, ", <, >, {, }, etc. | Encoded | Encoded |
| Non-ASCII | Unicode characters | Encoded as UTF-8 bytes | Encoded as UTF-8 bytes |
Worked example: a search URL with a tricky value
You want to send the query cats & dogs / 100% to a search endpoint at https://example.com/search.
- The value is one component, so encode only the value with component mode:
cats%20%26%20dogs%20%2F%20100%25. - Concatenate into the URL by hand:
https://example.com/search?q=cats%20%26%20dogs%20%2F%20100%25. - Sanity-check: paste the full result into full-URL decode mode here. You should get the original value back, not a parse error.
If you encoded the whole URL with component mode by mistake, you would have escaped the :, the /, and the ?, and the resulting string would be a literal — not a URL.
Common mistakes
- Encoding a URL twice. A second pass turns
%20into%2520. The receiving server decodes once and ends up with literal%20in the parameter value. If your encoded URL contains%25followed by hex digits in unlikely places, that is the symptom. - Using full-URL mode on a single parameter. Full-URL mode does not escape
&or=, so an ampersand in your value will split the parameter. Always use component mode for single values. - Forgetting that
+means space in form mode. When decoding form data you must convert+to space first; otherwise"a+b"arrives as"a+b"instead of"a b". The decoder here does that automatically. - Encoding bytes that do not need it.
%2Ffor a path-segment slash is technically optional in some contexts and forbidden in others (some web servers reject pre-encoded slashes for security reasons). Keep encoding minimal: only what the parser would otherwise misread.
Where this fits with the other tools on the site
Pair the URL encoder with the Base64 encoder when you are constructing a URL-safe token: Base64-URL the bytes, then drop them into a query parameter without further encoding. To inspect a JSON payload that arrived in a URL, decode here, then run it through the JSON formatter. For prop URLs in a screen recording, the fake prop-data generator covers hostnames and IDs that cannot collide with real ones.