URL Encode and Decode
Percent-encode text so it is safe inside a web address, or decode %20-style text back to normal.
URL encoder
Choose encode or decode and what you are working on.
Result
Result
hello%20world%20%26%20more%3D%C3%A9
21
UTF-8 bytes
Private: Everything runs in this page. Nothing you type is sent anywhere or saved.
On this page
URL encoding examples
| Text | Encoded as a value | Encoded as a whole URL |
|---|---|---|
| hello world & more | hello%20world%20%26%20more | hello%20world%20&%20more |
| a/b?c=d | a%2Fb%3Fc%3Dd | a/b?c=d |
| café | caf%C3%A9 | caf%C3%A9 |
| 100% sure | 100%25%20sure | 100%25%20sure |
Formula
unsafe characters become % followed by two hex digits of their UTF-8 bytes
How the url encoder works
- Step oneChoose Encode or Decode.
- Step twoPick A value for a single parameter or path part, or A whole URL to keep characters such as / ? and & as they are.
- Step threeCopy the result from the box.
What this tool does not do
- It does not check that a web address works or that the page exists.
- Encoding a whole URL keeps its structure characters, so it cannot fix an address that is already wrong.
- It uses UTF-8 percent-encoding only.
Frequently asked questions
What is the difference between a value and a whole URL?
A value is encoded fully, including / ? & and = so it cannot break the address. A whole URL keeps those characters, because they give the address its structure.
Why would I want + for spaces?
HTML forms send spaces as plus signs. Most other places use %20, which is the default here.
Why does decoding say my text is not valid?
A percent sign must be followed by two hex digits, and the bytes must form valid UTF-8 text.