RFC 3986 URL Percent Encoder and Query Decoder
Prevent broken HTTP requests and parse tangled query parameters effortlessly.
Web addresses can only carry a limited set of characters, so spaces, ampersands and non-English letters have to be written as percent codes. You will meet this when building a link with a search phrase in it, when passing a redirect address as a query parameter, or when a tracking link arrives looking like a wall of %20 and %2F. People also use the page to debug an API call that returns an error because a value containing an ampersand silently split into two parameters. Decoding is just as common: reading a logged URL in plain language.
Pick URL Encode or URL Decode at the top. Type or paste into the box labelled Input URL or Parameter, and the result appears beside it under Encoded Result or Decoded Result, ready for the copy button. When encoding, there is a checkbox called Encode Special URL Chars (encodeURIComponent). Leave it off for a whole address, which keeps characters such as slashes, question marks and ampersands intact. Tick it when the text is a single value that will be placed inside a query string, so those characters are converted as well.
The most frequent mistake is encoding a complete URL with the checkbox ticked, which turns https:// into https%3A%2F%2F and breaks the link. The opposite error is leaving it off for a value that contains an ampersand or equals sign, which will then be read as a separator. Decoding fails with the message Malformed URI sequence when a percent sign is not followed by two valid hex digits, for example a literal 100% in the text. Also remember that a plus sign is not converted to a space here.
Take the text a b&c=d/é. With the checkbox ticked it encodes to a%20b%26c%3Dd%2F%C3%A9, which is safe to drop in as a single parameter value. Note that the accented letter becomes two bytes, %C3%A9, because URLs use UTF-8. Without the checkbox, the address https://x.com/a b?q=1&r=é comes out as https://x.com/a%20b?q=1&r=%C3%A9, with the structure preserved and only the space and accent changed. Decoding either result gives you back the original text exactly. Pasting the result back into the decoder is a good habit whenever you are unsure.
Key Highlights:
- Bidirectional encode/decode
- Query string breakdown table
- RFC 3986 compliant

