URL encoding is the practice of translating unprintable characters or characters with special meaning within URLs to a representation that is unambiguous and universally accepted by web browsers and servers.
These characters include:
Scheme | Stands for | Used for |
---|---|---|
http | HyperText Transfer Protocol | Common web pages. Not encrypted |
https | Secure HyperText Transfer Protocol | Secure web pages. Encrypted |
ftp | File Transfer Protocol | Downloading or uploading files |
file | - | A file on your computer |
There are certain characters which sometimes have special meanings in the URL and it can be used in both ways. According to RFC 3986, the characters in a URL only limited to a defined set of reserved and unreserved US-ASCII characters.
Any other characters are not allowed in a URL. But URL often contains characters outside the US-ASCII character set, so they must be converted to a valid US-ASCII format for worldwide interoperability. URL-encoding, also known as percent-encoding is a process of encoding URL information so that it can be safely transmitted over the internet.
The browser will encode input according to the character-set used in the page.
The default character-set in HTML5 is UTF-8.
Decimal | Character | URL Encode |
---|---|---|
0 | - | %00 |
1 | - | %01 |
2 | - | %02 |
3 | - | %03 |
4 | - | %04 |
5 | - | %05 |
6 | - | %06 |
7 | - | %07 |
8 | backspace | %08 |
9 | tab | %09 |
10 | linefeed | %0a |
11 | - | %0b |
12 | - | %0c |
13 | carriage return | %0d |
14 | - | %0e |
15 | - | %0f |
16 | - | %10 |
17 | - | %11 |
18 | - | %12 |
19 | - | %13 |
20 | - | %14 |
21 | - | %15 |
22 | - | %16 |
23 | - | %17 |
24 | - | %18 |
25 | - | %19 |
26 | - | %1a |
27 | - | %1b |
28 | - | %1c |
29 | - | %1d |
30 | - | %1e |
31 | - | %1f |