URL Encoder & Decoder
Percent-Encoding
Percent-encode or decode URL text with encodeURIComponent or encodeURI for query strings, redirects, and API parameters.
This conversion runs only in your browser — nothing is uploaded.
Spaces become %20 (not +). Default is Component mode for query values; Full URI leaves reserved punctuation.
- Input0
- Output0
- OptionsComponent (encodeURIComponent)
Input
Output
What is this tool?
This URL encoder and decoder applies percent-encoding so reserved characters, spaces, and Unicode can travel safely in query strings, path segments, redirect parameters, and API calls.
Choose Component (encodeURIComponent, default) for a single value, or Full URI (encodeURI) when you want to keep :, /, ?, and & readable in a whole URL. Conversion updates live; nothing leaves your browser.
Percent-encoding is not encryption. Anyone can decode the result.
Common use cases
- Encode a query parameter value that contains spaces,
&, or= - Prepare or inspect a nested redirect URL before putting it in
?redirect= - Decode a percent-encoded log line or API error to readable text
How to use
- Choose Encode or Decode. Results update as you type.
- Leave Full URI off for query/path values (Component). Turn it on only when encoding an entire URL string.
- Paste text or a percent-encoded string. Use Sample to compare Component vs Full URI.
- Copy the output. If decode fails, look for
%ZZ, a trailing%, or truncated UTF-8.
encodeURI vs encodeURIComponent
| Input | Component (encodeURIComponent) | Full URI (encodeURI) |
|---|---|---|
a b&c=1 | a%20b%26c%3D1 | a%20b&c=1 |
https://ex.com/a?b=1 | https%3A%2F%2Fex.com%2Fa%3Fb%3D1 | https://ex.com/a?b=1 |
a+b=c | a%2Bb%3Dc | a+b=c |
Use Component for values you will place inside a query or path. Use Full URI only when the input is already a complete URL and you want separators preserved.
Examples
| Input / setting | Output | Notes |
|---|---|---|
hello world → Component encode | hello%20world | Spaces become %20. |
a b&c=1 → Component encode | a%20b%26c%3D1 | & and = are encoded for a single value. |
a b&c=1 → Full URI encode | a%20b&c=1 | Reserved punctuation stays; space still %20. |
hello+world → Component decode | hello+world | + is a literal plus here—not a form-urlencoded space (edge vs many form parsers). |
Practical pitfalls
- Do not Component-encode an entire URL unless you intend every
/and?to become%2F/%3F(common redirect bug). application/x-www-form-urlencodedtreats+as space;decodeURIComponentdoes not. Prefer%20for URL components.- Encoding is not access control—encoded secrets in query strings still appear in logs and Referer headers.
References
Last reviewed: 2026-07-26
Frequently asked questions
- What is the difference between Component and Full URI mode?
- Component mode uses encodeURIComponent / decodeURIComponent and encodes reserved characters such as &, =, ?, and /. Full URI mode uses encodeURI / decodeURI and leaves those separators so a whole URL structure can stay readable while unsafe characters are still escaped.
- Why is a space encoded as %20 instead of +?
- This tool follows percent-encoding (RFC 3986 / encodeURIComponent). The + for spaces appears in application/x-www-form-urlencoded bodies, not in encodeURIComponent. A literal + becomes %2B in Component mode.
- Why does decoding fail?
- Malformed percent sequences such as %ZZ, a lone %, or incomplete UTF-8 byte sequences cannot be decoded safely. Fix the escapes or paste a complete encoded value.
- Is data sent to a server?
- No. Encode and decode run only in your browser.