Latest web development tutorials

HTML URL encoding Reference Manual


URL-encoded characters will be converted into the format transmitted through the Internet.


URL - Uniform Resource Locator

Web browser through the URL from a web page request to the server.

URL is a web address, suchas: http://www.w3big.com.


URL encoding

URL can only use the ASCII character set to be sent via the Internet.

Since the URL often contains characters outside the ASCII set, URL must be converted to a valid ASCII format.

URL encoded using "%" followed by two hexadecimal numbers to replace the non-ASCII characters.

URL can not contain spaces. URL encoding typically use + to replace spaces.


try it

If you click on the "Submit" button, the browser will be URL encoded before sending input. Page on the server will show the received input.

Try entering some of the other characters, and then click the submit button again.


URL encoding function

JavaScript, PHP, ASP provides functions for URL-encoded string.

JavaScript is used encodeURI () function, PHP use rawurlencode () function, ASP used Server.URLEncode () function.

Click "URL Encoding" button to see how the JavaScript function is the text encoding.

Note: JavaScript function spaces encoded as% 20.


URL Encoding Reference

ASCII 字符 URL-编码
space %20
! %21
" %22
# %23
$ %24
% %25
& %26
' %27
( %28
) %29
* %2A
+ %2B
, %2C
- %2D
. %2E
/ %2F
0 %30
1 %31
2 %32
3 %33
4 %34
5 %35
6 %36
7 %37
8 %38
9 %39
: %3A
; %3B
< %3C
= %3D
> %3E
? %3F
@ %40
A %41
B %42
C %43
D %44
E %45
F %46
G %47
H %48
I %49
J %4A
K %4B
L %4C
M %4D
N %4E
O %4F
P %50
Q %51
R %52
S %53
T %54
U %55
V %56
W %57
X %58
Y %59
Z %5A
[ %5B
\ %5C
] %5D
^ %5E
_ %5F
` %60
a %61
b %62
c %63
d %64
e %65
f %66
g %67
h %68
i %69
j %6A
k %6B
l %6C
m %6D
n %6E
o %6F
p %70
q %71
r %72
s %73
t %74
u %75
v %76
w %77
x %78
y %79
z %7A
{ %7B
| %7C
} %7D
~ %7E
  %7F
` %80
%81
%82
ƒ %83
%84
%85
%86
%87
ˆ %88
%89
Š %8A
%8B
Π%8C
%8D
Z %8E
%8F
%90
' %91
' %92
" %93
" %94
%95
%96
%97
˜ %98
%99
š %9A
%9B
œ %9C
%9D
z %9E
Ÿ %9F
  %A0
%A1
¢ %A2
£ %A3
%A4
¥ %A5
¦ %A6
§ %A7
¨ %A8
© %A9
ª %AA
« %AB
%AC
­ %AD
® %AE
¯ %AF
° %B0
± %B1
² %B2
³ %B3
%B4
µ %B5
%B6
· %B7
. %B8
ª %B9
%BA
» %BB
1/4 %BC
1/2 %BD
3/4 %BE
%BF
À %C0
Á %C1
 %C2
à %C3
Ä %C4
Å %C5
Æ %C6
C %C7
E %C8
E %C9
E %CA
E %CB
I %CC
I %CD
I %CE
I %CF
Ð %D0
Ñ %D1
O %D2
O %D3
O %D4
O %D5
O %D6
× %D7
Ø %D8
U %D9
U %DA
U %DB
U %DC
Y %DD
Þ %DE
ß %DF
a %E0
a %E1
a %E2
a %E3
a %E4
a %E5
a %E6
c %E7
e %E8
e %E9
e %EA
e %EB
i %EC
i %ED
i %EE
i %EF
%F0
n %F1
o %F2
o %F3
o %F4
o %F5
o %F6
÷ %F7
%F8
u %F9
u %FA
u %FB
u %FC
y %FD
þ %FE
y %FF


URL Encoding Reference

ASCII device control characters were originally designed to control hardware devices such as printers and tape drives and the like. These characters do not play any role in the URL.

ASCII 字符 描述 URL-编码
NUL null character %00
SOH start of header %01
STX start of text %02
ETX end of text %03
EOT end of transmission %04
ENQ enquiry %05
ACK acknowledge %06
BEL bell (ring) %07
BS backspace %08
HT horizontal tab %09
LF line feed %0A
VT vertical tab %0B
FF form feed %0C
CR carriage return %0D
SO shift out %0E
SI shift in %0F
DLE data link escape %10
DC1 device control 1 %11
DC2 device control 2 %12
DC3 device control 3 %13
DC4 device control 4 %14
NAK negative acknowledge %15
SYN synchronize %16
ETB end transmission block %17
CAN cancel %18
EM end of medium %19
SUB substitute %1A
ESC escape %1B
FS file separator %1C
GS group separator %1D
RS record separator %1E
US unit separator %1F