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

  1. Choose Encode or Decode. Results update as you type.
  2. Leave Full URI off for query/path values (Component). Turn it on only when encoding an entire URL string.
  3. Paste text or a percent-encoded string. Use Sample to compare Component vs Full URI.
  4. Copy the output. If decode fails, look for %ZZ, a trailing %, or truncated UTF-8.

encodeURI vs encodeURIComponent

InputComponent (encodeURIComponent)Full URI (encodeURI)
a b&c=1a%20b%26c%3D1a%20b&c=1
https://ex.com/a?b=1https%3A%2F%2Fex.com%2Fa%3Fb%3D1https://ex.com/a?b=1
a+b=ca%2Bb%3Dca+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 / settingOutputNotes
hello world → Component encodehello%20worldSpaces become %20.
a b&c=1 → Component encodea%20b%26c%3D1& and = are encoded for a single value.
a b&c=1 → Full URI encodea%20b&c=1Reserved punctuation stays; space still %20.
hello+world → Component decodehello+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-urlencoded treats + as space; decodeURIComponent does not. Prefer %20 for 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.