What is URL Encoding and Why Does %20 Mean Space?
Published April 2025 · 5 min read
Ever seen %20 in a URL and wondered what it means? It's a space. Here's why.
Why URLs Can't Have Spaces
URLs can only contain a limited set of ASCII characters. Spaces, special characters, and non-English characters aren't allowed. URL encoding converts them to a safe format.
How It Works
Each unsafe character is replaced with % followed by its two-digit hex ASCII code:
| Character | ASCII (hex) | Encoded |
|---|---|---|
| Space | 20 | %20 |
| & | 26 | %26 |
| = | 3D | %3D |
| ? | 3F | %3F |
| # | 23 | %23 |
| @ | 40 | %40 |
%20 vs + for Spaces
%20 is the standard URL encoding for space. + is used only in form data (application/x-www-form-urlencoded). In URLs, always use %20.
Example
Original: https://example.com/search?q=hello world&lang=en
Encoded: https://example.com/search?q=hello%20world&lang=en
Try It
Use our URL Encoder/Decoder to encode or decode any URL.