Skip to content

Percent Encoding Tester

Compare the three kinds of URL encoding, decode escaped text, and see which characters differ.

Runs in your browserNo account neededFree
Loading tool…

Processing: This tool runs entirely in your browser. Your input and any file you open stay on your device — nothing is uploaded to a server.

How to use the percent encoding tester

  1. Choose whether you are encoding a whole URL, a value, or a form field.
  2. Type or paste the text; the result updates as you go.
  3. Read the table to see which characters the three rules treat differently.

About this tool

"URL encoding" is not one operation, and choosing the wrong one is the bug this page exists to make visible. Encoding a whole URL leaves the characters that give it structure alone — `&`, `?`, `/`, `#` all survive — because otherwise the URL stops being a URL. Encoding a value that goes *inside* a URL escapes exactly those characters, because the value must not be read as structure.

Apply the first rule to a value and an ampersand inside it starts a new parameter: a search for "fish & chips" reaches the server as a search for "fish" plus a mystery parameter called "chips". That is the single most common percent-encoding fault, and the comparison table here shows precisely which characters the rules disagree about.

Form encoding is the third rule and differs in exactly one place: a space becomes `+` rather than `%20`. It is a historical quirk with no logic behind it, and it survives because too much depends on it. Decode a form value with the wrong rule and every space arrives as a plus sign.

Percent-encoding escapes *bytes*, not characters, which is why one accented letter becomes two escapes and an emoji becomes four — the byte column shows what is actually being escaped. Double encoding is detected too, since a value that passed through two layers that each encoded it produces the `%2520` that turns up in broken links.

Common uses

  • Working out why a query parameter is being truncated at an ampersand.
  • Decoding a URL from a log or an error message.
  • Checking whether a value has been encoded twice.

Frequently asked questions

What is the difference between encodeURI and encodeURIComponent?
encodeURI leaves the characters that structure a URL alone — & ? / # : — so it suits a whole URL. encodeURIComponent escapes them, which is what a value inside a URL needs.
Why is a space sometimes + and sometimes %20?
Form encoding uses +, everything else uses %20. It is a historical quirk kept for compatibility, and decoding with the wrong rule leaves plus signs in your text.
What does %2520 mean?
A double-encoded space: %20 was encoded again, turning its % into %25. It means a value passed through two layers that each encoded it.

Related tools