URL encoding is a method to convert data (characters) with a % followed by two
hexadecimal digits format so that the data can be transmitted over the Internet.
For example, a question mark ? becomes %3F.
URLs can only be safely transmitted over the Internet when they are encoded using the US-ASCII character set).
Characters such as spaces, &, ?, =, and others
are not part of the US-ASCII set and can have special meanings within URLs, these
characters must be encoded. Without encoding, these characters could be misinterpreted,
leading to errors and unexpected behavior.
URL decoding is a method to convert encoded characters back into their original form . This is useful when you need to view/use the original URL.
For example, ? is encoded as %3F. When you decode the text How%3F, you get the original text How?.
| Character | Encoded | Decoded |
|---|---|---|
| Exclamation Mark | %21 | ! |
| Double Quote | %22 | " |
| Hash Sign | %23 | # |
| Dollar Sign | %24 | $ |
| Percent Sign | %25 | % |
| Ampersand | %26 | & |
| Single Quote | %27 | ' |
| Left Parenthesis | %28 | ( |
| Right Parenthesis | %29 | ) |
| Asterisk | %2A | * |
| Plus Sign | %2B | + |
| Comma | %2C | , |
| Hyphen/Minus | %2D | - |
| Period | %2E | . |
| Slash | %2F | / |
| Colon | %3A | : |
| Semicolon | %3B | ; |
| Less Than | %3C | < |
| Equal Sign | %3D | = |
| Greater Than | %3E | > |
| Question Mark | %3F | ? |
| At Sign | %40 | @ |
| Left Square Bracket | %5B | [ |
| Backslash | %5C | \ |
| Right Square Bracket | %5D | ] |
| Caret | %5E | ^ |
| Underscore | %5F | _ |
| Grave Accent | %60 | ` |
| Space | %20 | |
Original: Hello World!
Encoded: Hello%20World%21
Original: https://www.convertchief.com?name=Jack Sparrow&title=Captain
Encoded: https%3A%2F%2Fwww.convertchief.com%3Fname%3DJack%20Sparrow%26title%3DCaptain