Developer

URL Encoder and Decoder

Encode a value so it survives being dropped into a URL, or decode one that arrived unreadable. If what you paste has a query string, the parameters get pulled apart underneath so you can see what is actually in there.

Value encoding is encodeURIComponent, whole-URL encoding is encodeURI. Using the wrong one on a full address destroys it.

Options

Both apply to single-value encoding only. Strict also escapes ! ' ( ) *, which OAuth and AWS signatures require.

0Characters in
0Characters out
0Escapes

Percent-encoding in one paragraph

A URL is allowed to contain a small set of characters. Everything else gets written as a percent sign followed by the two hex digits of its byte: a space is %20, a hash is %23. Non-ASCII characters are converted to UTF-8 first and then escaped one byte at a time, so é becomes %C3%A9 — two escapes for one character. A tool that produces %E9 instead is using Latin-1 and will break on anything modern.

The characters that never need escaping

RFC 3986 calls them unreserved: the letters A–Z and a–z, the digits 0–9, and the four marks - . _ ~. They mean the same thing escaped or not, so escaping them is legal but pointless, and it makes two identical URLs look different to a cache.

Then there are the reserved characters — / ? # [ ] @ : $ & ' ( ) * + , ; = — which are the punctuation that gives a URL its structure. Whether they need escaping depends entirely on where they sit. Inside a value, a stray & starts a new parameter and silently truncates your data. In the URL itself, it is doing its job.

Which of the two encoders you want

This is the distinction the mode selector above is making, and it is the same one behind JavaScript's two functions:

The plus sign is genuinely ambiguous

In the application/x-www-form-urlencoded format — what HTML forms send, and therefore what most query strings look like — a space is written as +. In RFC 3986, which governs URLs generally, + is a literal plus sign. Both are correct in their own context, and a query string does not tell you which rule produced it.

The practical consequence: a phone number in a query string is a trap. ?tel=+44123 arrives at many servers as " 44123". If a value can contain a plus, encode it as %2B and stop relying on either convention. The parameter table above decodes + as a space, because that is the more common case, which means it shows the wrong thing for values where the plus was literal.

Double encoding, and why you cannot undo it reliably

Encode a string twice and %20 becomes %2520, because the percent itself gets escaped. The tool warns you when it sees that pattern, and when a decode leaves escapes behind. What it cannot do is tell you whether that was a mistake: a URL containing the literal text 100%25 is a perfectly valid thing to store. Once double-encoded data reaches a database, the ambiguity is permanent.

What this tool does not handle

Frequently asked questions

What is the difference between encodeURI and encodeURIComponent?

encodeURIComponent escapes the structural characters / ? & = # as well, so it is for one value. encodeURI leaves them alone so a whole address stays usable. Using encodeURI on user input is the bug that lets a value break out of its parameter.

Should a space be %20 or a plus sign?

Both appear in the wild. Form submissions use +, and RFC 3986 uses %20 and treats + as a literal plus. %20 is safe everywhere, so prefer it, and always encode a real plus sign as %2B.

Why does one accented character turn into two escapes?

Because percent-encoding works on bytes, not characters, and the text is converted to UTF-8 first. The character e-acute is two bytes in UTF-8, so it becomes %C3%A9. Emoji take four bytes and produce four escapes.

My decoded text still has percent signs in it. What happened?

It was encoded twice. Send the output back to the input and decode again. The tool flags this, but it cannot prove the second pass was a mistake rather than literal text.

Does this work for international domain names?

No. Hostnames with non-ASCII characters use punycode, a separate algorithm that produces names starting with xn--. Percent-escapes are not valid in a hostname at all.

Last updated September 19, 2026