Sunday, May 16, 2010

Securing your URL with Hexadecimal codes

SkyHi @ Sunday, May 16, 2010

Hexadecimal equivalent codes of ASCII characters can be used to represent characters of a URL’s path and filename.

Each hex number is preceded by a “%” symbol to identify the following two numbers/letters as a hexadecimal representation of the character

An ASCII chart can be used for the conversion from ASCII to Hex or vice versa

One good source for ASCII to Hex charts is (both the tables below have been taken from this URL)




The need for typing in Hex codes into a URL is to make it possible to include special characters in a URL which would otherwise be wrongly interpreted or not allowed. A good example is SPACE which would not be able to fit into a URL in its original form and hence is represented by the Hex code 20 (prefixed by % in a URL making it %20)


For example, if we were to visit the URL , it could be written as


B =  %42

I = %49

N = %4e

G = %47


Hence, could be written as


Note: The “slashes” in the address cannot be represented in hex; nor can the IP address be rendered using this logic (the %XX way) but the rest of the URL can be manipulated