How to use URL Encoder and Decoder
- 1Choose Encode or Decode and paste your text.
- 2When encoding, pick Query value / path part (encodeURIComponent) or Full URL (encodeURI). Turn on Spaces as + for HTML form style encoding, or Each line separately for lists.
- 3Copy the result, or click Swap to reverse the direction.
- 4Open the URL parser tab and paste a link to see its protocol, host, path, fragment and a decoded table of query parameters.
Component or full URL?
Use Query value / path part for a single value you are inserting into a URL, such as a search term or a redirect target. It encodes characters like &, =, ? and / so they cannot break the URL. Use Full URL for a complete link that contains spaces or accented letters; it keeps :, /, ?, & and # so the link still works.
Forms submitted by browsers encode spaces as +; most other places use %20. When decoding, turn on Treat + as a space for form data.
URL parser and tracking cleanup
The parser shows each query parameter decoded, with its own copy button, which is handy for debugging redirects, OAuth callbacks and analytics links. If the link contains tracking parameters such as utm_source, fbclid or gclid, a Copy clean URL button gives you the same link without them.
Errors and privacy
When a string contains an invalid percent sequence, such as a lone %, the decoder decodes everything it can and tells you where the problem is, instead of failing. All conversions run in your browser.
What each mode leaves alone (tested)
We encoded Tom & Jerry's (C++) 50% both ways:
- Query value / path part:
Tom%20%26%20Jerry's%20(C%2B%2B)%2050%25 - Full URL:
Tom%20&%20Jerry's%20(C++)%2050%25
Full URL mode keeps & and + because they have meaning inside a complete link. That is exactly why it is wrong for a single value: dropped into ?q=, the & would start a new parameter and the + would turn into spaces on many servers. Use Query value for anything you insert into a link.
Both modes leave the characters ! ' ( ) * as they are, which is how browsers' encodeURIComponent works and is fine for ordinary links. A few systems want them encoded too, notably OAuth 1.0 request signing; there, replace them by hand with %21, %27, %28, %29 and %2A.
The plus sign and double-encoded links
Plus signs. We decoded q=C%2B%2B+tips. With Treat + as a space off, the result was q=C+++tips; with it on, q=C++ tips. Real plus signs arrive encoded as %2B, so a bare + in a form-style query string is a space. Turn the option on for search and form URLs, and off for everything else.
Double encoding. A link that went through two systems can be encoded twice, so % itself becomes %25. Decoding %25ED%2595%259C once gave %ED%95%9C; decoding that result again gave the Korean character 한. If a decoded result still contains % followed by two hex digits, click Swap and decode again. The tell-tale sign of double encoding is %25 followed by two more hex digits.
Old links in other encodings
Modern URLs encode non-English text as UTF-8, which is what RFC 3986 recommends for new schemes and what browsers send. Older sites sometimes used a local encoding instead. The Korean word 한글 is %ED%95%9C%EA%B8%80 in UTF-8 (three %XX per character) but %C7%D1%B1%DB in the legacy EUC-KR encoding (two per character). French é is %C3%A9 in UTF-8 and %E9 in Latin-1.
This decoder reads UTF-8 only. Given the EUC-KR form, it reported an invalid percent sequence near %C7%D1 and left the text as it was, rather than guessing and producing the wrong characters. If you see that message on a link from an older site, the encoding is the likely cause, not a typo.
Frequently asked questions
What is URL encoding?
It replaces characters that are not allowed or have special meaning in URLs with a % followed by their hex code, for example a space becomes %20.
What is the difference between encodeURI and encodeURIComponent?
encodeURI keeps characters that structure a URL such as / ? & #. encodeURIComponent encodes them too, so it is right for single values.
Should spaces be %20 or +?
%20 works everywhere in a URL. + means a space only in query strings sent by HTML forms.
How do I decode a URL with %20 and %3A?
Choose Decode and paste it. %20 becomes a space and %3A becomes a colon.
Why does my decoded text still contain %XX codes?
The text was probably encoded twice, so %25 turned into % on the first pass. Decode the result a second time. If the tool reports an invalid sequence instead, the bytes may come from an old non-UTF-8 encoding such as Latin-1 or EUC-KR, which this decoder does not read.
Why are apostrophes and parentheses not encoded?
Browsers' standard encoder leaves ! ' ( ) * unencoded because they are safe in URLs. If a system requires them encoded, such as OAuth 1.0 signing, replace them with %21, %27, %28, %29 and %2A.
Should I turn on Treat + as a space?
Yes for query strings produced by HTML forms and search boxes, where + means a space. No for paths and other text, where + is a literal plus sign. In our test, q=C%2B%2B+tips decoded to q=C++ tips only with the option on.
