~ / developer / url-encoder

🔗 URL Encoder / Decoder

Percent-encode spaces, accents and emoji for a URL, or turn %C3%A9-style gibberish back into readable text. Query strings are broken out into a table.

options
Mode
Function
Options
output
URL breakdown · query string parameters

How to use

  1. Paste a URL or any text and choose Encode or Decode. The output updates instantly.
  2. Encoding a single query value (a search term, a redirect URL inside a parameter)? Choose encodeURIComponent. Making a complete URL safe without breaking its structure? Choose encodeURI.
  3. The URL breakdown table at the bottom shows host, path and every query-string key/value, decoded. Its copy button copies the parameters as tab-separated rows you can paste into a spreadsheet.

What is URL encoding (percent encoding)?

URLs may only contain a limited set of ASCII characters: letters, digits and a few symbols such as - _ . ~. Anything else — spaces, accented letters, emoji, or reserved characters like ? & = # / when you mean them as data — must be converted to its UTF-8 bytes written as %XX in hexadecimal. That's percent encoding, defined in RFC 3986.

For example, é is two bytes in UTF-8 (C3 A9), so it becomes %C3%A9; the thumbs-up emoji 👍 is four bytes and becomes %F0%9F%91%8D. A space becomes %20. Browsers show the friendly version in the address bar, but the encoded form is what actually travels to the server.

encodeURIComponent vs. encodeURI

CharacterencodeURIComponentencodeURI
space%20%20
é%C3%A9%C3%A9
/ ? :%2F %3F %3Aunchanged
& = #%26 %3D %23unchanged
+%2Bunchanged
- _ . ~ ! * ' ( )unchangedunchanged

encodeURIComponent also encodes the characters that give a URL its structure, so it's what you want for one value going into a query string. If a search term contains & — say "rock & roll" — and you use encodeURI, you get ?q=rock%20&%20roll and the server sees two parameters. encodeURI leaves https://, ? and & alone and only fixes spaces and non-ASCII characters, which makes it right for an already-assembled URL.

Space: %20 or +?

HTML forms submitted with GET use application/x-www-form-urlencoded, where a space becomes +. URL paths and encodeURIComponent use %20. If + signs aren't turning back into spaces when you decode, turn on the "space ↔ +" option. The URL breakdown table always treats + as a space, like a form would. In code: JavaScript's URLSearchParams and Python's urllib.parse.quote_plus use +; Python's quote uses %20.

Tips

Some very old websites encoded URLs in a legacy character set such as Windows-1252/Latin-1 instead of UTF-8 (e.g. %E9 for é). If UTF-8 decoding fails, the tool automatically retries with legacy encodings (EUC-KR for old Korean sites, then Windows-1252) and tells you which one it used. All processing happens in your browser.

FAQ

How do I decode a URL like %C3%A9?
Paste it in and choose Decode. If the result still contains %XX codes, the URL was encoded twice — click "use output as input" to decode it again.
Should I use encodeURIComponent or encodeURI?
Use encodeURIComponent for a piece of a URL, such as a query parameter value or a path segment. Use encodeURI only for a complete URL that already has its structure. When in doubt, encode each value with encodeURIComponent.
Why is a space sometimes %20 and sometimes +?
Both mean a space. %20 is standard percent encoding used in paths and by encodeURIComponent; + is the HTML form (application/x-www-form-urlencoded) convention used in query strings. Turn on the space ↔ + option to switch.
Is URL encoding a form of encryption?
No. It is a reversible notation that anyone can decode, just like Base64. Never rely on it to hide passwords or personal data.
What does %20 mean in a URL?
%20 is a percent-encoded space character (hex 20 = decimal 32, the ASCII code for space). Other common ones: %2F is /, %3F is ?, %26 is &, %3D is =.

Related tools