How percent-encoding works
Each unsafe character is replaced by % followed by its byte value in hexadecimal. Characters outside basic ASCII are first converted to UTF-8 bytes, and each byte is encoded.
| Character | Encoded |
|---|---|
| space | %20 (or + in form data) |
| & | %26 |
| / | %2F |
| ? | %3F |
| é | %C3%A9 |
Example: café & tea → caf%C3%A9%20%26%20tea.
Component vs full URL encoding
The most common bug is encoding the wrong amount:
- Component encoding is for a single value placed inside a URL, such as a search term. It encodes
&,/,?and=, so they cannot break the URL’s structure. - Full URL encoding makes a whole address safe while keeping its structure — the
://, slashes and?stay as they are. - Form data encoding (
application/x-www-form-urlencoded) is what HTML forms send; spaces become+.
If a search for “salt & pepper” only searches for “salt”, the & was not encoded as part of the value.
Encode, decode and inspect a URL
- Paste a URL or text into the URL Encoder and Decoder.
- Choose Component, Full URL or Form data.
- Select Encode or Decode. In form mode,
+is decoded as a space. - Select Parse URL to see every part of an address — protocol, host, path, query and fragment — with query parameters decoded in a table.
Parsing is especially handy for long tracking links; the UTM Link Builder builds correctly encoded campaign links in the first place.
Double encoding
If you see %2520, the text was encoded twice: % itself became %25. Decode once to get %20, then again to get a space. In the tool, select Use output as input and decode again. To avoid it, encode each value exactly once, at the point where you build the URL.
Common errors
Decoding fails when a % is not followed by two hexadecimal digits, for example in “50% off”. The tool reports where. Internationalised domain names appear in their punycode form (xn--…) when parsed, because that is how browsers send them.
Frequently asked questions
Should I use %20 or + for spaces?
Use %20 in paths and in most query strings. + means a space only in form-encoded data; in a path it is a literal plus sign.
Is URL encoding the same as Base64?
No. URL encoding replaces only unsafe characters and leaves the rest readable. Base64 converts all of the data into a different alphabet.