URL Encoder and Decoder
Percent-encodes a value for a query string, or a whole URL, and decodes either direction back again.
Loading the tool…
How to use this tool
- Paste the value or the URL.
- Choose "a single value" for something going into one query string parameter, or "a whole URL" for a complete address.
- Select Encode, or Decode to go the other way.
- Build a URL by encoding each value separately and then assembling, never by encoding the finished URL.
What url encoder does
There are two different jobs here and using the wrong one causes most URL encoding bugs. Encoding a whole URL leaves the characters that give it structure alone, so :, /, ? and & keep working. Encoding a single value escapes those too, because inside a query string parameter an unescaped & ends the parameter and an unescaped = splits it.
The rule is simple once stated: encode each parameter value on its own, then assemble the URL from the encoded pieces. Encoding the finished URL as a value breaks it, and encoding a value as a whole URL leaves an ampersand in a customer name to truncate your parameter. The decode direction also treats + as a space, which is how a submitted HTML form encodes one.