This page serves as an online URL encoder and decoder tool. It also explains the concept of URL encoding and decoding and acts as a handy reference for developers who often need to look up this stuff.
URL Encoding is used when placing text in a query string to avoid it being confused with the URL itself. For example, when a browser sends form data to a web server, it needs to be URL encoded. Such encoding is required for worldwide interoperability and uniformity. Read more about this below.
URL Encoder And Decoder
Disclaimer: This tool does not log, store or give out to third parties any of the decoded data, nor the visitors IP addresses or user agents.
The goal of this tool is to provide the most simple and instant URL encoding and decoding solution for even average users, without the need to make any decisions or configuration settings. Just paste your data and push the encode or decode button, that’s all 🙂
More About URL Encoding…
The term “URL encoding” isn’t exactly correct because the encoding process is not limited to URLs, but can be applied to URIs (Uniform Resource Identifiers) such as URNs (Uniform Resource Names) as well. A more correct term would be Percent-Encoding.
Since only about 60 characters are allowed in a URI, it is necessary to convert the large range of characters used worldwide into the few allowed characters. A two-step process is used for this conversion:
- The character string is converted into a sequence of bytes using UTF-8 encoding
- Each byte that is not an ASCII letter or digit is converted to %HH, (HH being the hexadecimal value of the byte)
Allowed Characters In A URI
According to RFC3986, characters in a URL must be taken from a set of unreserved and reserved ASCII characters (or the percent symbol used for percent-encoding). No other characters are allowed in a URL. Reserved characters sometimes have special meaning, while unreserved characters don’t. Using percent-encoding, characters which would not normally be allowed are represented using allowed characters.
You could choose to encode the unreserved characters, but they should not be encoded. The unreserved characters are:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9 – _ . ~
The reserved characters are:
! * ‘ ( ) ; : @ & = + $ , / ? % # [ ]
They should be encoded under certain circumstances.
Offending characters are replaced by a percent symbol (%) and a two digit hexadecimal value that represents the character in the ISO character set. For example:
- $ (Dollar Sign) is encoded as %24
- & (Ampersand) is encoded as %26 and so on…
With URL encoding, it becomes possible to transmit characters with special meaning in a form which is parsed as pure data.