URL Encoding in HTTP

HTTP URLs sent over the internet using the ASCII character-set. In URL-encoding, the following things are performed:

1. Convert all the "unsafe" characters to "%xx", where xx is the ASCII value of the character in hexadecimal.

2. All the spaces changes into pluses.

3. String the name and value together with = and &

Example

4. For POST submission, the string will be our message body, and for GET submission, the query string will be our message body.

The ASCII symbols of the characters and their replacements are shown in the following table. These replacements of the symbol can be used in the URL before passing it to the server:

SymbolASCIIReplacement
Backspace08%08
tab09%09
linefeed10%0A
creturn13%0D
space32%20 or +
!33%21
"34%22
#35%23
$36%24
%37%25
&38%26
'39%27
(40%28
)41%29
*42*
+43%2B
'44%2C
-45-
.46.
/47%2F
0480
1491
2502
3513
4524
5535
6546
7557
8568
9579
:58%3A
;59%3B
<60%3C
=61%3D
>62%3E
?63%3F
@64%40
A65A
B66B
C67C
D68D
E69E
F70F
G71G
H72H
I73I
J74J
K75K
L76L
M77M
N78N
O79O
P80P
Q81Q
R82R
S83S
T84T
U85U
V86V
W87W
X88X
Y89Y
Z90Z
[91%5B
\92%5C
]93%5D
^94%5E
_95_
.96%60
a97a
b98b
c99c
d100d
e101e
f102f
g103g
h104h
i105i
j106j
k107k
l108l
m109m
n110n
o1110
p112p
q113q
r114r
s115s
t116t
u117u
v118v
w119w
x120x
y121y
z122z
{123%7B
|124%7C
}125%7D
~126%7E
127%7F
> 127Encode with "%xx", where "xx" is the ASCII value of the character, in hexadecimal

Next TopicHTTP Security




Latest Courses