English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
URL encoding converts characters to a format that can be transmitted over the network.
Web browsers request pages from web servers using URLs.
URL is the address of a web page, for example: https://www.oldtoolbag.com.
URLs can only use the ASCII character set to be sent over the network.
Since URLs often contain characters outside the ASCII set, they must be converted to a valid ASCII format.
URL encoding uses "%" followed by two hexadecimal digits to replace non-ASCII characters.
URLs cannot contain spaces. URL encoding is typically used + to replace spaces.
If you click the "Submit" button below, the browser will URL encode the input before sending it. The page on the server will display the received input.
Try entering some other characters and then click the submit button again.
JavaScript, PHP, and ASP all provide functions for URL encoding strings.
JavaScript uses the encodeURI() function, PHP uses the rawurlencode() function, and ASP uses the Server.URLEncode() function.
Click the "URL Encoding" button to see how JavaScript functions encode text.
Note:JavaScript function encodes space as %20 space
ASCII character | URL-encoding |
---|---|
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 |
O | %51 |
P | %52 |
Q | %53 |
R | %54 |
S | %55 |
T | %56 |
U | %57 |
V | %58 |
W | %59 |
X | %5A |
Y | %5B |
Z | %5C |
[ | %5D |
\ | %5E |
] | %5F |
} | %60 |
^ | %61 |
_ | %62 |
a | %63 |
b | %64 |
c | %65 |
d | %66 |
e | %67 |
f | %68 |
g | %69 |
h | %6A |
i | %6B |
j | %6C |
k | %6D |
l | %6E |
m | %6F |
n | %70 |
o | %71 |
p | %72 |
q | %73 |
r | %74 |
s | %75 |
t | %76 |
w | %77 |
u | %78 |
v | %79 |
x | %7A |
y | %7B |
z | %7C |
{ | %7D |
| | %7E |
%7F | |
} | %80 |
~ | %81 |
` | %82 |
| %83 |
‚ | %84 |
ƒ | %85 |
„ | %86 |
… | %87 |
† | %88 |
‡ | %89 |
ˆ | %8A |
‰ | %8B |
Š | %8C |
‹ | %8D |
Ž | %8E |
’ | %8F |
†| %90 |
' | %91 |
' | %92 |
" | %93 |
" | %94 |
• | %95 |
– | %96 |
— | %97 |
˜ | %98 |
™ | %99 |
š | %9A |
› | %9B |
œ | %9C |
| %9D |
ž | %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 |
¼ | %BC |
½ | %BD |
¾ | %BE |
¿ | %BF |
À | %C0 |
Á | %C1 |
 | %C2 |
à | %C3 |
Ä | %C4 |
Å | %C5 |
Æ | %C6 |
Ç | %C7 |
È | %C8 |
É | %C9 |
Ê | %CA |
Ë | %CB |
Ì | %CC |
Í | %CD |
Î | %CE |
Ï | %CF |
Ð | %D0 |
Ñ | %D1 |
Ò | %D2 |
Ó | %D3 |
Ô | %D4 |
Õ | %D5 |
Ö | %D6 |
× | %D7 |
Ø | %D8 |
Ù | %D9 |
Ú | %DA |
Û | %DB |
Ü | %DC |
Ý | %DD |
Þ | %DE |
ß | %DF |
à | %E0 |
á | %E1 |
â | %E2 |
ã | %E3 |
ä | %E4 |
å | %E5 |
æ | %E6 |
ç | %E7 |
è | %E8 |
é | %E9 |
ê | %EA |
ë | %EB |
ì | %EC |
í | %ED |
î | %EE |
ï | %EF |
ð | %F0 |
ñ | %F1 |
ò | %F2 |
ó | %F3 |
ô | %F4 |
õ | %F5 |
ö | %F6 |
÷ | %F7 |
ø | %F8 |
ù | %F9 |
ú | %FA |
û | %FB |
ü | %FC |
ý | %FD |
þ | %FE |
ÿ | %FF |
ASCII device control characters were originally designed to control hardware devices such as printers and tape drives. In URLs, these characters do not play any role.
ASCII character | description | URL-encoding |
---|---|---|
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 |