This website may use cookies. More info. That's Fine x
Welcome Login

Url encoding


Characters that do not need to be encoded within a URL are:

Only a limited subset of US-ASCII characters are allowed to be used unencoded within a URL:

1. Alphanumerics: [0-9a-zA-Z]

2. Special characters: $ - _ . + ! * ' ( ) ,

3. and reserved characters used for their reserved purposes, Eg: ?, & used as part of a url query

 

 

Characters that need to be encoded within a URL are:

a. ASCII Control characters

b. Non-ASCII characters

c. Reserved characters used not for their reserved purposes:

Character               Hex       Dec
Dollar ($)              24        36
Ampersand (&)           26        38
Plus (+)                2B        43
Comma (,)               2C        44
Forward slash (/)       2F        47
Colon (:)               3A        58
Semi-colon (;)          3B        59
Equals (=)              3D        61
Question mark (?)       3F        63
'At' symbol (@)         40        64

 

d. Unsafe characters:

Character	        Hex      Dec      Why encode
Space                   20       32       Significant sequences of spaces may be lost in some uses (especially multiple spaces)
Quotation marks         22       34       These characters are often used to delimit URLs in plain text.
<                       3C       60
>                       3E       62
Pound character (#)     23       35       This is used in URLs to indicate where a fragment identifier 
                                          (bookmarks/anchors in HTML) begins.   
Percent character (%)   25       37       This is used to URL encode/escape other characters, so it should itself also be encoded.
Misc. characters:                         Some systems can possibly modify these characters.
{                       7B       123
}                       7D       125
|                       7C       124
\                       5C       92
^                       5E       94
~                       7E       126
[                       5B       91
]                       5D       93
Grave accent (`)        60       96

 

 

To URL encode a character:

URL encoding of a character consists of a "%" symbol, followed by the two-digit hexadecimal representation (case-insensitive) of the ISO-Latin code point for the character.

Eg:

Space = "%20"

 

 

 

For url encoding convert, see here.

For url encoder / decoder, see here.  Or directly from here.


Created on: Wednesday, June 20, 2012 by Andrew Sin