URL Encoding Table

Update: because I am frequently encoding or decoding strings, I have created a URL encode and decode script for use on my site.

Anyone that has programmed in web technologies has used URL encoded characters at some point. For those are wondering, one of the purposes of URL encoding is to allow certain characters in a URL string that would otherwise be prohibited as anything other than their original purpose. An example would be =, which is typically used as part of the querystring structure – if you were to add this character to your querystring, not intending it as an equal sign defining another querystring variable, it would break your querystring statement intention. There are many other uses for URL encoding, and as you develop web technologies you will find yourself using them more often than not.

The digits following the % sign is a hexadecimal equivalent of the ASCII decimal number for that character. For an example, visit the ACSII Chart located at cppreference.com.

As a real example, I am using URL encoding in the Source= statement with SharePoint Services. For more information on source= with SharePoint, see my other article.

character URL code ASCII
space %20 32
! %21 33
%22 34
# %23 35
$ %24 36
% %25 37
& %26 38
%27 39
( %28 40
) %29 41
* %2A 42
+ %2B 43
, %2C 44
- %2D 45
. %2E 46
/ %2F 47
0 %30 48
1 %31 49
2 %32 50
3 %33 51
4 %34 52
5 %35 53
6 %36 54
7 %37 55
8 %38 56
9 %39 57
: %3A 58
; %3B 59
< %3C 60
= %3D 61
> %3E 62
? %3F 63
@ %40 64
A %41 65
B %42 66
C %43 67
D %44 68
E %45 69
F %46 70
G %47 71
H %48 72
I %49 73
J %4A 74
K %4B 75
L %4C 76
M %4D 77
N %4E 78
O %4F 79
P %50 80
Q %51 81
R %52 82
S %53 83
T %54 84
U %55 85
V %56 86
W %57 87
X %58 88
Y %59 89
Z %5A 90
[ %5B 91
\ %5C 92
] %5D 93
^ %5E 94
_ %5F 95
` %60 96
a %61 97
b %62 98
c %63 99
d %64 100
e %65 101
f %66 102
g %67 103
h %68 104
i %69 105
j %6A 106
k %6B 107
l %6C 108
m %6D 109
n %6E 110
o %6F 111
p %70 112
q %71 113
r %72 114
s %73 115
t %74 116
u %75 117
v %76 118
w %77 119
x %78 120
y %79 121
z %7A 122
{ %7B 123
| %7C 124
} %7D 125
~ %7E 126

-Aaron Gilbert

About aaron

IT is not just a job but also a passion. Everything I have accomplished, both personally and professionally, has been generally entertaining, bordering on fun. Some of my projects, such as working with SharePoint Services workflow actions in Visual Studio or building a custom iSCSI SAN using the OpenSolaris, ZFS and COMSTAR, has been quite rewarding. You may think nerd...I think developing a new trend!