URL Encoding Explained: What %20 Means, and How to Encode or Decode a Link
Why links turn into %20 and %2F, a table of common codes, component vs full URL encoding, plus vs %20, double encoding bugs, and decoding messy links.
Updated November 4, 20268 min read
URL encoding, also called percent encoding, rewrites characters that cannot sit safely inside a web address as a percent sign followed by two hex digits. A space becomes %20, a slash becomes %2F, a question mark becomes %3F, and an accented letter becomes two or three of these codes in a row. It exists because a URL uses characters like ? & = # and / as punctuation, so when your own text contains them they have to be escaped or the address means something else. Paste the text into the URL encoder and decoder, choose Encode or Decode, and the result appears as you type. It all runs on your device, not our servers.
Why URLs need encoding
A web address is made of parts separated by punctuation. The slash splits the path, the question mark starts the query, the ampersand separates one parameter from the next, the equals sign joins a name to its value, and the hash starts the fragment. These characters are called reserved, because they carry structure.
Trouble starts when the data itself contains one of them. A search for fish & chips put straight into a link produces ?q=fish & chips, which a server reads as a parameter q with the value "fish " and then a second, empty parameter called " chips". Written as fish%20%26%20chips, nothing is ambiguous. Encoding does not make a link secret or safer to click. It only makes the meaning of each character unambiguous.
The codes you will see most often
| Character | Code | Why you meet it |
|---|---|---|
| Space | %20 | Names and titles in a path or query. Also written + in forms |
| / | %2F | A slash inside a value, such as a nested URL or a file path |
| ? | %3F | A question mark that belongs to the data, not the query |
| & | %26 | An ampersand inside a value, like "Tom & Jerry" |
| = | %3D | An equals sign inside a value, common in Base64 padding |
| # | %23 | A hash that must not start the fragment, such as a hashtag |
| % | %25 | A literal percent sign; it has to be escaped itself |
| + | %2B | A real plus sign, as in a phone number or an email alias |
| : | %3A | The colon in https:// when a whole link is passed as a value |
| @ | %40 | An email address used as a value |
| , | %2C | Lists of values separated by commas |
| " | %22 | Quotation marks in search text |
How to encode or decode a URL
Open the tool and pick a direction
Open the URL encoder and decoder. Choose Encode to turn text into escapes, or Decode to read escapes as plain text.
Paste the text
Type or paste into the input box. The result updates live, so there is nothing to press. You can also drop a text file with one link per line and switch on Convert each line separately.
Choose the Encoding profile
Use Component for one value, Full URL for a whole link, Strict RFC 3986 for OAuth 1.0 or AWS request signing, and Form for what a browser sends when it submits a form. The next section explains the difference.
Copy the result
Copy it, or download it as a text file. Use output as input swaps the direction so you can check that the text comes back unchanged.
Four encoding profiles, live results, and a breakdown of every query parameter. Free: one text file up to 10 MB at a time. Pro: 20 files and a single ZIP download. It all runs on your device, not our servers.
Encode or decode a URLComponent or full URL?
This is the choice that causes most mistakes. A component is one piece you are putting into a link: a single query value, a name, a path segment. A full URL is a finished address that already has its punctuation in the right places. Component encoding escapes the punctuation, because inside a value those characters are just data. Full URL encoding leaves the punctuation alone, because it is doing its job.
| Profile | Leaves literal | Use it for |
|---|---|---|
| Component | Letters, digits and - _ . ! ~ * ' ( ) | One query value or path segment. The safe default |
| Strict RFC 3986 | Letters, digits and - . _ ~ only | OAuth 1.0 and AWS request signing, which escape ! ' ( ) * too |
| Full URL | The above plus : / ? # & = + $ , ; @ | Cleaning up a whole link that is already shaped correctly |
| Form | Letters, digits and * - . _ ; space becomes + | What a browser sends when a form is submitted |
A practical rule: if you are building a link out of pieces, encode each piece as a component and join them yourself. Encoding the finished link as a component would turn https:// into https%3A%2F%2F and the address would stop working. The opposite mistake, encoding a value in full URL mode, leaves an ampersand inside it untouched, and that ampersand then splits your value in two.
Decoding has one safeguard worth knowing. In Full URL mode, %2F stays as %2F by default, because turning it into a real slash would add a path segment that was never there. If you want plain readable text instead, tick Also decode : / ? & =.
Plus sign or %20 for a space?
Both mean a space, but not in the same places. %20 is correct everywhere. A plus sign means a space only in form-style data, which is the part of a link after the question mark and the body of a submitted form. In a path, a plus sign is just a plus sign. So /my+file.pdf is a file really named my+file.pdf, while ?q=my+file means the search text "my file".
The tool follows this rule. With Treat + as a space on, decoding a full link turns the plus into a space only after the first question mark and leaves the path alone. If you want a real plus sign in a value, encode it as %2B; leaving it bare in a query is how a phone number like +44 20 7946 0000 arrives with its plus replaced by a space.
Non-English letters, accents and emoji
Percent codes stand for bytes, not for letters. Before escaping, text is converted to UTF-8, the encoding almost every modern site uses. Plain English letters are one byte each, but other characters need more, and each byte gets its own code. That is why one visible character can turn into a run of codes.
| Character | UTF-8 bytes | Encoded |
|---|---|---|
| é | 2 | %C3%A9 |
| € | 3 | %E2%82%AC |
| 日 | 3 | %E6%97%A5 |
| 😀 | 4 | %F0%9F%98%80 |
An encoded address can therefore be several times longer than the text you typed. Old systems sometimes expect another character set, such as Windows-1252 or Shift_JIS, and in those %E9 alone means é. If decoding gives you question marks or odd symbols, change the Character set setting from UTF-8 to the one the old system used. For new work, leave it on UTF-8.
Double encoding and other bugs
The classic symptom is %2520 where you expected %20. It happens when one piece of code encodes a value and a second piece, which does not know that, encodes it again. The first pass turns a space into %20. The second turns the % into %25, giving %2520. Each extra layer adds another 25.
- Set Repeat passes above 1. The tool decodes up to five times and stops as soon as a pass changes nothing, then tells you how many passes the text really needed.
- A truncated escape. A copied link that ends in %E or %4 is broken. With Recover from broken escapes on, the tool keeps everything valid and reports where each bad escape sits, instead of failing the whole string.
- Old %u00E9 escapes. Strings from a long-retired scripting function use %u plus four hex digits. The tool has a switch to read them.
- A lost plus sign. See the section above; encode a real plus as %2B.
Decoding a messy tracking link
Links from newsletters, ads and shared posts often wrap the real destination inside a redirect address, then encode it once or twice. A made-up example: https://track.example/go?url=https%253A%252F%252Fshop.example%252Fp%253Fid%253D42%2526ref%253Dmail&utm_source=news+letter
Paste it in, choose Decode and set Repeat passes to 2 or more. One pass gives url=https%3A%2F%2Fshop.example%2Fp%3Fid%3D42%26ref%3Dmail, still encoded. The second pass gives url=https://shop.example/p?id=42&ref=mail, the real destination. Look also at the URL breakdown: it lists each query parameter decoded on its own, with the label "Query parameters, each decoded on its own", so you can see that utm_source is "news letter" and which parameter is the wrapped link.
Reading a link this way is also a cheap safety check, since you can see where it really goes before you open it. Remember that decoding only reveals what is written; it cannot tell you whether the destination is trustworthy. If you want to share the clean address as a code, make one with the QR code generator. For data that is not a link at all, such as a file inside JSON, see what Base64 encoding is.
Frequently asked questions
What does %20 mean in a URL?
It is a space. A URL cannot contain a literal space, so the space is written as a percent sign followed by 20, which is its value in hexadecimal. Decode the text and every %20 turns back into a space.
How do I URL encode a string for free?
Open the URL encoder and decoder, choose Encode, pick the Component profile for a single value, and paste your text. The result updates as you type and you can copy it with one click. It runs on your device, not our servers.
How do I decode a URL with %20 and %2F in it?
Choose Decode and paste the link. For a whole address use the Full URL profile; note that %2F stays as %2F by default, and ticking Also decode : / ? & = turns it into a slash. Use Repeat passes if the link still contains codes afterwards.
What is the difference between encodeURI and encodeURIComponent?
encodeURI is meant for a whole address and leaves : / ? # & = alone. encodeURIComponent is meant for one piece and escapes them. In the tool these are the Full URL and Component profiles.
Why does my URL show %2520?
It was encoded twice. The first pass made %20, the second turned its percent sign into %25. Decode with Repeat passes set to 2 or more, and fix the code that encodes the value a second time.
Is URL encoding the same as encryption?
No. Anyone can decode it in a second, and it hides nothing. It only makes sure special characters are not mistaken for the structure of the address.