Encode or decode URLs and query strings
Paste text to percent-encode it for use in a link, or paste an encoded string such as caf%C3%A9%20menu to turn it back into readable text. Encoding and decoding run in your browser, so tokens and email addresses inside your links are not sent anywhere.
What URL encoding does
A URL may only contain a small set of characters: letters, digits and a few symbols. Everything else, including spaces, accented letters, emoji and characters that have a job inside a URL such as & = ? / and #, has to be written as a percent sign followed by two hexadecimal digits for each byte of its UTF-8 form. A space becomes %20, an ampersand becomes %26, and é, which takes two bytes in UTF-8, becomes %C3%A9.
Encode the value, not the whole address
The encoder escapes every character except A to Z, a to z, 0 to 9 and - _ . ! ~ * ' ( ). That is exactly right for a single query value or path segment. Paste a complete address, though, and the :// and the slashes are encoded as well, so the link stops working. Build the address yourself and encode only the parts you insert into it.
Say you want to link to a search for fish & chips. The correct link is https://example.com/search?q=fish%20%26%20chips. Leave the ampersand unencoded and the server reads the q value as just fish, followed by a second, empty parameter.
Spaces: %20 or a plus sign?
Two conventions exist. Standard percent-encoding writes a space as %20, and that is what this tool produces. HTML forms submitted the traditional way write a space as a plus sign instead, so a query string copied from a form submission may read q=fish+and+chips. This decoder leaves plus signs as they are. If your text came from a form, replace each + with a space before decoding.
When decoding goes wrong
- The tool reports an error. There is a percent sign that is not followed by two valid hexadecimal digits, as in 100% or %G1. A literal percent sign has to be written as %25.
- You see %2520 or %252F. The text was encoded twice, because %25 is an encoded percent sign. Decode it a second time to get the original.
- Accented letters come out as é or similar. The text was encoded as UTF-8 somewhere and decoded with a different character set somewhere else. This tool always uses UTF-8, the standard for the web.
Where it comes in handy
Building UTM-tagged campaign links, putting an email address or a redirect URL into a query parameter, reading a long tracking link to see where it really points, and debugging API requests where a value with a slash or an ampersand keeps breaking the call.