URL Encoding

15 Oct

You must URL encode any data you’ll pass on in a query string, such as a form post, or other url parameters.

I’m always having to look these up, so this article is as much for my reference as yours.

A URL encoded character is the ascii value of the character preceded with %, with a special case for <space> which is quite common.

 

Here are some of the most common characters.

 

Character

URL Encoded

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

 

Here is a full ascii table you can use to find the hex codes for other characters, click to enlarge it…

Leave a Reply

Your email address will not be published. Required fields are marked *