URL encoder and decoder
Pick “Value” for a single parameter (everything is encoded), or “Full URL” to keep : / ? & =. Nothing is opened or sent.
Result
caf%C3%A9%20%26%20th%C3%A9%20%3D%205%E2%82%ACEncoded text
- Result length
- 45
Inputs
- Action
- Encode
- What you encode
- A value (encodeURIComponent)
- Text or URL
- café & thé = 5€
How it is calculated
Each character is turned into UTF-8 bytes, then each byte into %XX (hex). e.g. space = %20, é = %C3%A9.
Result
Encoded text
- Result length
- 45
How it is calculated
- Each character is turned into UTF-8 bytes, then each byte into %XX (hex). e.g. space = %20, é = %C3%A9.
- Value: letters, digits and - _ . ! ~ * ' ( ) stay as they are; everything else is encoded.
- Full URL: the separators ; , / ? : @ & = + $ # are kept too.
Example
“café & thé = 5€” as a value gives caf%C3%A9%20%26%20th%C3%A9%20%3D%205%E2%82%AC.
Good to know
- No page is loaded: the tool does not check that the URL exists.
- A form “+” is not read as a space when decoding.
When to use it
- Read a link full of % codes copied from a browser or a log.
- Prepare a value with spaces or accents before adding it to a query string.
- For a domain name with accents, use the Punycode converter.
Frequently asked questions
Why does é become %C3%A9?
The character is first written in UTF-8, which uses two bytes for é. Each byte is then written as % followed by two hex digits.
Which characters never need encoding?
Letters A–Z and a–z, digits, and - _ . ~ are always safe. Others, such as & = ? / #, have a role in URLs and are encoded inside a value.
What is double encoding?
Encoding a value twice turns % into %25, so %20 becomes %2520. If you see %25 in a link, it was probably encoded twice.