What Does %20 Mean in a URL? Every Common Encoded Character
Published November 25, 2026 · 6 min read
%20 in a URL means a space. URLs can't contain spaces or many special
characters, so browsers replace them with a % sign and the character's code in
hexadecimal. This is called percent-encoding or URL encoding. So my%20file.pdf is really
my file.pdf.
Decode any URL instantly: paste it into the free URL Encoder & Decoder and click Decode.
Why URLs use %20 instead of spaces
A URL is only allowed to use a small set of characters: letters, numbers and a few symbols like
-, _, . and ~. Some other characters have a special
job. For example, ? starts the
query string, & separates
parameters and # starts the page fragment.
When your text contains a space or one of those special characters as normal text, it must be encoded so the browser doesn't misread it.
Common URL-encoded characters
| Character | Encoded | Why it is encoded |
|---|---|---|
| space | %20 (or + in form data) | Spaces are not allowed |
! | %21 | Reserved in some contexts |
" | %22 | Not allowed |
# | %23 | Starts a fragment |
$ | %24 | Reserved |
% | %25 | Starts an encoding |
& | %26 | Separates parameters |
' | %27 | Reserved in some contexts |
( ) | %28 %29 | Reserved in some contexts |
+ | %2B | Can mean a space in queries |
, | %2C | Reserved |
/ | %2F | Separates path parts |
: | %3A | Separates scheme and port |
; | %3B | Reserved |
= | %3D | Separates key and value |
? | %3F | Starts the query string |
@ | %40 | Separates user info |
[ ] | %5B %5D | Reserved for IPv6 |
Non-English characters
Letters outside basic English, such as Urdu, Arabic, Hindi or accented letters, are first turned into
UTF-8 bytes, and each byte is encoded. That is why one letter can become several codes. For example, the
Urdu letter ا becomes %D8%A7, and é becomes %C3%A9.
Browsers often show the readable version in the address bar but send the encoded one.
%20 vs +: what is the difference?
Both can mean a space, but in different places:
- In the path of a URL (
/my%20file.pdf), only%20means a space. A+stays a plus sign. - In the query string of a submitted form (
?q=red+shoes),+is also read as a space.
If you need a real plus sign in a query, encode it as %2B.
Double encoding: when you see %2520
%2520 means a URL was encoded twice. The first pass turned the space into
%20, then the second pass turned the % into %25. This usually
happens when code encodes a value that was already encoded. Decode once with the
URL Decoder to see the original, and fix the code so it
encodes only once.
How to encode and decode in code
| Language | Encode (space to %20) | Decode |
|---|---|---|
| JavaScript | encodeURIComponent(value) | decodeURIComponent(value) |
| PHP | rawurlencode($value) (use urlencode for +) | rawurldecode($value) |
| Python | urllib.parse.quote(value, safe='') (use quote_plus for +) | urllib.parse.unquote(value) |
Three details catch people out:
- In JavaScript, use
encodeURIComponentfor a single parameter value.encodeURIis for a whole URL and leaves&,=,?and/alone. encodeURIComponentdoesn't encode! ' ( ) *. That is fine for URLs, but some strict APIs (such as OAuth signatures) need them encoded too.- Python's
quote()leaves/unencoded by default. Passsafe=''when encoding a single value.
The full background, with more examples, is in URL Encoding Explained.
Should you use spaces in file names and slugs?
No. Use hyphens. /how-to-take-a-screenshot is cleaner than
/how%20to%20take%20a%20screenshot, and easier to share. The
URL Slug Generator turns any title into a clean slug,
and How to Create an
SEO-Friendly URL Slug explains the rules.
Paste text or a link and encode or decode it in one click. Tick the whole-URL option to keep : / ? # & intact.
Frequently asked questions
What does %20 mean in a link?
It is an encoded space.
What does %2F mean?
It is an encoded forward slash (/).
Is %20 bad for SEO?
It works, but hyphens are cleaner and easier to read. Avoid spaces in URLs you create.
How do I remove %20 from a URL?
Decode it to read it. To get rid of it for good, rename the file or page with hyphens instead of spaces.
Related articles
URL Encoding Explained: How to Encode and Decode URLs (With Examples)
What URL (percent) encoding is, which characters need it, encoding a value vs a full URL, a table of common codes, JavaScript and PHP examples, and how to fix double-encoding.
Read More →Query String Explained: What Comes After the ? in a URL
How ?, & and = work, the parts of a URL, reading parameters in JavaScript, PHP, Laravel, Flask and Django, plus security and SEO tips.
Read More →How to Create an SEO-Friendly URL Slug: Rules, Examples and Mistakes
What a URL slug is, 9 rules for SEO-friendly slugs with good and bad examples, how to handle accents and stop words, and how to change a slug safely with a 301 redirect.
Read More →