With the Free & Online URL Encode tool, you can effortlessly encode the decoded URL or decode the encoded URL into a human-readable format.
The URL encoding process is constructive when you want to add special characters to the URL, which is more suggestively known as percent-encoding.
It involves replacing the not-allowed characters or unsafe characters in the URL with a percent (%) sign, followed by the two hexadecimal values.
How do I encode a URL?
ASCII character set is used as a standard character set to transmit the URL on the internet. However, the URL often contains characters that are outside the ASCII character set. That needs to be converted into the ASCII character set. URL encoding replaces these outsiders ASCII characters into percent(%) sign, followed by two hexadecimal digits.
As you know, the URL cannot contain space, so the encoding process replaces space with the plus (+) sign or %20 or the slash (/) with %2f.
Should I encode URL parameters?
I am referring to RFC 1738, which provided a standard in carrying the URL on the internet, stating that the listed set of characters is allowed in a URL. Some characters are listed below.
- A to Z (ABCDEFGHIJKLMNOPQRSTUVWXYZ)
- a to z (abcdefghijklmnopqrstuvwxyz)
- 0 to 9 (0123456789)
- - (Hyphen / Dash)
- _ (Underscore)
- . (Period)
- + (Plus sign)
- ! (Exclamation / Bang)
- * (Asterisk / Star)
- (Single Quote)
- ( (Open Bracket)
- ) (Closing Bracket)
However, the URL often contains characters outside of the list of characters, as mentioned above. So it needs to be encoded.
How does URL encoding work?
URL encoding severs as the replacement of unsafe or outsiders from the ASCII character set into a percent (%) followed by two hexadecimal digits representing the ASCII character set. The resulted URL will also be known as a URL encoded string.
Even though it is widely known as URL-encoding, but generally, it is used in the URI. For encoding the specific information in the URI into proper and standard ISO character set. Like in the case of UTM tags or, in the case of sending the HTML forms data, entered into their fields to the servers through an HTTP request.
Some examples of replacement of unsafe or outsiders from the
ASCII character set into a percent (%) followed by two hexadecimal digits are below.
- "$" (Dollar Sign) converts into %24
- "&" (Ampersand Sign) converts into %26
- "+" (Plus Sign) converts into %2B
- "," (Comma Sign) converts into %2C
- ":" (Colon Sign) converts into %3A
- ";" (Semi-Colon Sign) converts into %3B
- "=" (Equals Sign) converts into %3D
- "?" (Question Mark Sign) converts into %3F
- "@" (Commercial A / At Sign) converts into %40
Which characters are allowed in a URL?
It is classified into two types.
- Reserved characters
- Unreserved characters
Reserved characters are those characters that could or sometimes have special meaning. Like the slash (/) used for the separation of different parts of the URL.
Unreserved characters are those characters that do not have special meaning. The URL is the combination of both reserved and unreserved ASCII characters. Other characters are not allowed in the URL.
The unreserved characters are not encoded. However, contrary to this, encoding is compulsory for the reserved characters in the URL.
So the URL encoding or, more generally, percent-encoding is the replacement of not-allowed characters into allowable characters in the URL. The process involves converting or replacing the not-allowed character into the corresponding byte value in ASCII format.
How does the URL Encode tool work?
As discussed above, the encoding is converting the non-ASCII characters into a percent (%) sing and two hexadecimal values. These hexadecimal values are equivalent to 8 bits.
The RFC 3986 does not provide any proper encoding table to encode the non-ASCII characters in the URL. So RFC 3629 proposes to use the UTF 8 character encoding table for non-ASCII characters.
The tool uses the UTF-8 character set to encode or decode the URL.
For encoding or decoding the URL, do the following steps.
- Open the Free & Online URL Encode Tool.
- Enter the URL, or use the "Load from URL" or "browse" option for getting the URL.
- Click on the "URL Encode" button in case you want to encode the decoded URL.
- Click on the "URL Decode" button in case you want to decode the encoded URL.
- The result is available in the upper section.
- Please copy the output and paste it into the desired location.
- You can decode the data using the same tool.
Note: We do not keep a copy of the resulted URL encoded form. Therefore, please copy the resulting URL encoded format, paste it to the desired location for future use if you are happy, and be satisfied with the results.