HTML URL Encode
URL encoding converts characters into a format that can be transmitted over the Internet.
URL - Uniform Resource Locator
Web browsers request pages from web servers by using a URL.
A URL is the address of a web page, like: `https://www.google.com`
URL Encoding
URLs can only be sent over the Internet using the ASCII character-set.
Since URLs often contain characters outside the ASCII set, the URL has to be converted into a valid ASCII format.
URL encoding replaces unsafe ASCII characters with a "%" followed by two hexadecimal digits.
URLs cannot contain spaces. URL encoding normally replaces a space with a plus (+) sign or with %20.
URL Encoding Example
Result
ASCII Encoding Reference
| Character | From | To | URL Encoded |
|---|---|---|---|
| Space | %20 | ||
| ! | ! | ! | %21 |
| " | " | " | %22 |
| # | # | # | %23 |
| $ | $ | $ | %24 |
| % | % | % | %25 |
| & | & | & | %26 |