URL encode and decode
Percent-encode text for a URL, or decode it back.
Editor
URL encode and decode: what it does
Characters such as spaces, accents and symbols must be percent-encoded to travel safely in a web address or query string. Encode your text for a URL, or paste an encoded string such as “hello%20world” and decode it.
URL encode and decode: how to use it
- Paste your text, or the encoded string.
- Choose URL encode or URL decode.
- Select Apply and copy the result.
URL encode and decode: when to use it
- Put a search phrase or a parameter value with spaces and accents into a URL.
- Read a tracking link or a redirect URL that is full of percent codes.
- Prepare a value for a query string in an API call or a form.
URL encode and decode: examples
Input
café & tea
Result
caf%C3%A9%20%26%20tea
Input
caf%C3%A9%20%26%20tea
Result
café & tea
Input
price=10€¬e=50% off
Result
price%3D10%E2%82%AC%26note%3D50%25%20off
URL encode and decode: questions and answers
Which characters are encoded?
Everything except letters, digits and the characters - _ . ! ~ * ' ( ). A space becomes %20 and an accented letter becomes its UTF-8 bytes.
Why does decoding show an error?
The text contains a percent sign that is not followed by two hexadecimal digits, or the bytes are not valid UTF-8.
Is a space %20 or a plus sign?
This tool writes %20, the form used in URL paths and most APIs. Decoding accepts a plus sign as a space as well.
Should I encode the whole URL?
No. Encode only the value of a parameter; encoding the full address would also escape the slashes and the question mark.
Is my text sent to a server?
No. Everything runs in your browser on your own device, so your text never leaves it.
Related tools
Tools people often use together with this one.
- Base64 encode and decode
Convert text to Base64, or decode Base64 back to text.
- HTML entities encode and decode
Escape text for HTML, or turn entities back into characters.
- URL slug generator
Turn any title into a clean, lowercase URL slug.
- Text to binary converter
Convert text to binary code, or binary back to text.
- Text to hex converter
Convert text to hexadecimal bytes, or hex back to text.
- ROT13 encoder and decoder
Scramble or unscramble letters with ROT13.
- camelCase, snake_case and kebab-case converter
Convert text to camelCase, snake_case, kebab-case and more.