URL Encoder and Decoder — Percent-Encoding
A URL percent-encoder and decoder that handles Unicode and emoji
Runs in your browser · nothing is uploaded
What it is
Only letters, digits and a few symbols can appear in a URL as they are. Anything else, such as non-Latin text, spaces or emoji, is converted to UTF-8 bytes and each byte is written as % plus two hex digits. That is percent-encoding. This tool shows the encoded or decoded result as you type.
How to use
- Choose Encode or Decode.
- Choose the scope: encodeURIComponent for one query value, encodeURI for a full URL.
- Paste text or a URL into the input and the result appears at once.
- When decoding form data, tick the plus-as-space option.
- Copy the result, or press Use output as input to check the round trip.
How it works
- The browser’s own
encodeURIComponent,encodeURI,decodeURIComponentanddecodeURIdo the work, following the rules of RFC 3986. - Text becomes UTF-8 bytes first. A Korean or Chinese character is 3 bytes, so you see three
%XXgroups, and an emoji is 4 bytes, so four. - Characters left unescaped are
A-Z a-z 0-9 - _ . ! ~ * ' ( ). encodeURI also leaves; , / ? : @ & = + $ #as they are. - An unpaired surrogate cannot be encoded and is reported as an error.
- A failed decode is never silently repaired; you get an error message instead.
Examples
| Input | Mode | Result |
|---|---|---|
a b&c=d |
Component | a%20b%26c%3Dd |
中文 |
Component | %E4%B8%AD%E6%96%87 |
👍 |
Component | %F0%9F%91%8D |
https://example.com/검색?q=a b |
Whole URL | https://example.com/%EA%B2%80%EC%83%89?q=a%20b |
FAQ
What is the difference between encodeURIComponent and encodeURI?
encodeURIComponent is for a single piece such as a query value, so it also escapes the separators / ? & = and #. encodeURI is for a whole URL and leaves those separators alone.
Why do I get a decoding error?
A % must be followed by two hex digits, and the resulting bytes must form valid UTF-8. Check that the string was not cut in the middle and that a literal % is not sitting in the text unescaped.
Should a space be %20 or +?
In a URL path it is %20. The + sign means a space only in HTML form encoding (application/x-www-form-urlencoded). Turn on the plus option when decoding that kind of data.
Is my URL sent to a server?
No. Everything happens in your browser.
Related tools
HTML Entity Encoder/Decoder
Encode and decode HTML entities for special and non-ASCII characters
Base64 Encoder/Decoder
A Base64 encoder and decoder that gets Unicode right
JWT Decoder
Decode JWT header and payload and check expiry (no signature verification)
QR Code Generator
Create URL, Wi-Fi and contact QR codes and download them as PNG or SVG
Mojibake Fixer
A tool that repairs mojibake by reversing every likely pair of mixed-up encodings