%20 in a URL
The percent-encoded space.
Short answer
%20 is the percent-encoded space character. A URL cannot contain a literal space, so a space is written as a percent sign followed by its byte value in hexadecimal, 20. In form-encoded query strings a space can also appear as a plus sign.
- Character
- space
- Percent-encoded
- %20
- Byte value
- 0x20 = 32
- RFC 3986 class
- unsafe
- UTF-8 bytes
- 1
Where you will see it
- File names and paths with spaces: /reports/Q3%20summary.pdf.
- Query values built with encodeURIComponent, Python's quote or Uri.EscapeDataString.
- Links copied from a browser's address bar, which stores spaces as %20.
What goes wrong
- %20 and + are not interchangeable everywhere. A plus means a space only in form-encoded data, such as HTML form submissions and URLSearchParams output. In a URL path, a plus is a literal plus sign, so a path must use %20.
- Seeing %2520 means the % in %20 was encoded a second time. Decode once more to get the space, then fix the code that encodes an already-encoded value.
Decoded examples
| Encoded | Decodes to | What it is | Open in the decoder |
|---|---|---|---|
| my%20file.pdf | my file.pdf | A file name containing a space. | Open in decoder |
| q=fish%20and%20chips | q=fish and chips | A query parameter with spaces in its value. | Open in decoder |
| a%2520b | a%20b | Double-encoded: one decode gives a%20b, a second gives a b. | Open in decoder |
How each language encodes a space
Outputs below come from running each function, not from documentation. “Kept” means the function leaves the character as it is. Compare every character across every function.
| Language | Function | Output for space |
|---|---|---|
| JavaScript | encodeURIComponent | %20 |
| JavaScript | encodeURI | %20 |
| JavaScript | URLSearchParams | + |
| JavaScript | escape (deprecated) | %20 |
| Python | quote (default safe='/') | %20 |
| Python | quote (safe='') | %20 |
| Python | quote_plus | + |
| C# | Uri.EscapeDataString | %20 |
| C# | WebUtility.UrlEncode | + |
| C# | HttpUtility.UrlEncode | + |
Questions
Is %20 the same as a plus sign?
Only in form-encoded query strings, where a plus sign is read as a space. Everywhere else, including URL paths, a plus is a literal plus and a space must be %20. When unsure, use %20: it is valid in every part of a URL.
Why does my URL show %20 instead of spaces?
URLs may only contain a limited set of ASCII characters, and a space is not one of them. Browsers and libraries replace each space with %20 so the address stays unambiguous. Pasting the link into the URL decoder shows the original text.
Decode or encode your own text
Paste anything containing %20. It runs in your browser; nothing is uploaded.
Related characters
%2B
plus sign
%2B is the percent-encoded plus sign (+).
%25
percent sign
%25 is the percent-encoded percent sign (%).
%3F
question mark
%3F is the percent-encoded question mark (?).
All percent-encoded characters · Full percent-encoding table · What is URL encoding?
Behaviour checked against RFC 3986, the WHATWG URL Standard and MDN. Updated November 4, 2026
Tools
URL Encoder
Percent-encode a value, a full URL or form data, with strict RFC 3986 and +/%20 options.
URL Parser
Split a URL into scheme, host, port, path, query and fragment, with checks for common problems.
Query String Parser
Edit query parameters as a table, rebuild the string, or export it as JSON.
Base64 Encode/Decode
Convert text to Base64 and back, including the URL-safe Base64URL alphabet.
HTML Encode/Decode
Escape text to HTML entities and decode entities back to text.
JWT Decoder
Read a JSON Web Token's header and payload and check its expiry.