URL encoding and decoding
A URL has to take on a certain format, a format that is not exactly human readable. So how then are both a human and a machine supposed to be able to read the same URL?
This tutorial focuses on:
- URL encoding
- URL decoding
Through the process of URL encoding, a URL is converted into valid URL format. This means that certain characters in the URL are converted into their proper URL encoded value such as the space character (URL encoded value of %20). This encoding is usually performed when a form is submitted because data submitted through a form can contain special characters such as ".", "#" or the space character that can have special meaning, are not valid in a URL, or can be altered during the transfer of the data.
Generally, any character that is not a number or letter (non alphanumeric) should be URL encoded. Examples of such characters include the "!", "@", "#", "$", and "%" characters.
As you will notice in the chart below, encoded values are in hexadecimal. This is because hexadecimal values are used to display non-standard letters and characters in a web browser.
A list of commonly encoded characers and their encoded value:
|<space>||%20 OR +|
NOTE: The space character can be encoded as "%20" or as "+"
Through the process of URL decoding, a URL is converted back into a string of regular characters that are human readable.
Use this URL encoder/decoder tool to encode and decode URL's:
NOTE: To see the URL encoder/decoder tool in action, use a URL that contains non-alphanumeric characters. We have provided this kind of URL for you to try it out.