URL Encode and Decode
Convert characters that cannot appear in a URL into %XX form, or decode them back. A whole URL and a single query value need different characters left alone, so you pick which one you are encoding.
What you enter never leaves your device. Everything runs in your browser; nothing is sent or stored anywhere.
What percent-encoding does
Only part of ASCII may appear in a URL. Everything else is converted to UTF-8 bytes, and each byte is written as % followed by two hex digits. A Korean or Japanese character is three bytes, so 가 becomes the nine characters %EA%B0%80. Letters, digits and -, _, ., ~ are never changed, and a space becomes %20. The address bar may show the readable characters, but what the browser actually sends is this form — which is why a copied URL is full of %.
`encodeURI` and `encodeURIComponent`
The two modes on this page are exactly those two browser functions. Whole-URL mode keeps : / ? # & = + $ , ; untouched; component mode encodes them too. Both leave ! ' ( ) * alone, even though the specification lists them as reserved, so a strict server may read them differently. If a query value contains & or = and you use whole-URL mode, the value gets cut at that character — for a single value, use component mode.
When decoding, `+` becomes a space
Form submission writes spaces as +, so decoding first turns + into a space and then resolves the percent sequences. A real plus sign inside a value survives only if it was written as %2B. Sequences with a byte missing, like a lone %E0, or with non-hex digits, like %zz, come back as undecodable — a URL that was cut off in the middle usually looks like this.
Decoding does not ask which mode
The choice between a whole URL and a component applies only when encoding. Decoding always uses the component rule, so %2F, %3F and %26 all come back as characters, and a whole URL decodes cleanly because its delimiters were never encoded. The rule turning + into a space always applies too, so a real plus in a path — /c++ — comes out as /c and two spaces. If a plus vanished from something that was not a form value, that is why.
`%` itself is encoded
In either mode % is not preserved: it becomes %25. Feed an already-encoded %20 back in and you get %2520, which is exactly how a link passed from hand to hand ends up wrapped twice. Encoding stacks to any depth and decoding peels one layer at a time — when you see %25, decode once more.
Frequently asked questions
What is the difference between the two modes?
Encoding a whole URL leaves the delimiters : / ? & = intact. Encoding a component escapes those too. If a query value contains & and you encode it as a whole URL, the value gets cut short at that ampersand — use the component mode for values.
Why treat a whole URL differently from one value?
Characters like ?, & and / carry structural meaning in a URL. Encode them while passing a whole address and the address breaks; leave them alone inside a query value and an & in the value reads as the start of the next parameter. Hence the two modes.
Shouldn't a space become `+`?
It depends where. In a path %20 is correct; in form submission encoding a space becomes +. If the receiving side parses form encoding and you send %20, it may survive literally — check which one the other end expects.
How do I undo double encoding?
If you see %2520, the %25 means it was wrapped twice. Decode once more. It happens easily when a link is passed along and re-encoded in the middle.
What about an internationalised domain name?
Wrong tool. Percent-encoding is the rule for paths and query values; host names follow IDNA and become the xn-- form. Put https://한글.kr in here and the host is percent-encoded too, and that address will not open. Paste it into the address bar as it is and the browser converts it.
Does anything I paste get sent to a server?
No. Everything runs inside your browser and nothing is uploaded or stored. That is why you can use it on things you would not normally paste into a web page, like an internal config file or a production query. It also works with your network disconnected.