You copy a link and it comes out full of %20 and %3A. Or a search term arrives with + where the spaces should be. Here’s what those codes mean, and how to fix a link that’s been mangled.
How it works
Every character has a number. URL encoding writes that number in hexadecimal (base 16) after a % sign. A space is number 32, which is 20 in hexadecimal, so it becomes %20.
hello world & more
hello%20world%20%26%20moreLetters outside basic English take more than one code. é becomes %C3%A9, and an emoji can take four codes. That’s normal.
The codes you’ll see most
| Character | Encoded | Why it needs encoding |
|---|---|---|
| space | %20 (or +) | Links can’t contain spaces |
& | %26 | Separates values after the ? |
= | %3D | Joins a name to its value |
? | %3F | Starts the list of values |
# | %23 | Jumps to a spot on the page |
/ | %2F | Separates folders in the path |
: | %3A | Follows https |
+ | %2B | Can mean a space, so a real plus sign must be encoded |
% | %25 | Starts every code |
Letters, digits and - _ . ~ never need encoding. They mean the same thing everywhere.
%20 or +?
Both stand for a space, but in different places:
- %20 works anywhere in a link. It’s always safe.
- + means a space only after the
?, where search terms and form values go. That’s how web forms send what you type. Search for “red shoes” and you’ll often see?q=red+shoes.
So if you want an actual plus sign, like C++ or a phone number +44, it must be written as %2B. Otherwise it arrives as a space. This is one of the most common bugs in sign-up forms and email links.
Double encoding: what %2520 means
Double encoding happens when text that’s already encoded gets encoded again. The % in %20 is itself turned into %25, giving %2520.
my file.pdf
my%20file.pdf ← encoded once (correct)
my%2520file.pdf ← encoded twiceVisit the second link and the server looks for a file literally called my%20file.pdf, which doesn’t exist. You get a 404.
How to spot it: look for %25 followed by two more characters, like %2520, %253A or %252F.
How to fix it: decode the text once, and check it. If it still has % codes where you expect plain characters, decode it again. Then find the step that encodes twice. It’s usually a link builder or plugin encoding a value that someone already encoded by hand.
Encode the part, not the whole link
If you’re putting your own text into a link, encode just that text, not the finished link. Encoding a whole link turns its :// and ? into codes and breaks it.
Right: https://example.com/search?q=fish%20%26%20chips
Wrong: https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dfish%20%26%20chipsThe one exception is when a whole link goes inside another link, such as a redirect. Then the inner link is encoded in full.
Encode or decode yours
The encode and decode tool converts text to and from URL encoding in both directions as you type. It also handles Base64 and HTML entities. Paste a mangled link to read it, or paste plain text to make it safe for a link. A + is read as a space when decoding, and %2B as a plus sign. Your text stays on your device.