HTML HTML intro.
  1. HTML intro
  2. Web pages and you
HTML basics
  1. HTML getting started
  2. HTML basics
  3. HTML document
HTML text
  1. HTML text formatting 1
  2. HTML text formatting 2
  3. HTML text formatting 3
  4. HTML fonts
  5. HTML entities
HTML links
  1. HTML links
  2. HTML email links
HTML images
  1. HTML images
  2. HTML image maps
HTML forms
  1. HTML forms
  2. HTML form labels
  3. HTML fieldset/legend
HTML tables
  1. HTML tables
  2. HTML tables concepts
HTML frames
  1. HTML frames
HTML backgrounds/color
  1. HTML backgrounds
  2. HTML colors
  3. HTML color shades
  4. HTML color usage
HTML style/layout
  1. HTML stylesheets
  2. HTML div/span
HTML media
  1. HTML audio
  2. HTML video
  3. HTML objects
  4. HTML download media
HTML declaratives
  1. HTML head section
  2. HTML meta tags
  3. HTML scripts
  4. HTML declarations
  5. HTML document types
Practical HTML
  1. HTML tag rules
  2. HTML things to avoid
  3. URL formatting
  4. URL encoding/decoding
  5. HTML use/access
  6. HTML publish work
HTML extras
  1. HTML marquees
HTML wrap-up
  1. HTML history
  2. HTML summary

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

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:

Character encoding
Character Encoded value
; %3B
? %3F
: %3A
# %23
& %26
= %3D
$ %24
, %2C
<space> %20 OR +
% %25
< %3C
> %3E
~ %7E
% %25

NOTE: The space character can be encoded as "%20" or as "+"

URL decoding

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.

© Copyright 2013-2014
Terms of use | Privacy policy | Copyright information