Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP C C++ C# AWS W3.CSS HOW TO BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS DSA TYPESCRIPT ANGULAR ANGULARJS GIT POSTGRESQL MONGODB ASP AI R GO KOTLIN SWIFT SASS VUE GEN AI SCIPY CYBERSECURITY DATA SCIENCE INTRO TO PROGRAMMING INTRO TO HTML & CSS BASH RUST TOOLS

HTML URL Encoding Reference


Share

URL Encoding (Percent Encoding)

A URL (web address) can only contain a small set of characters: letters (A-Z and a-z), numbers (0-9), and a few symbols like !, *, ', (, ), -, _, ., and ~.

URL encoding turns any other character into a safe code the URL can carry. Each such character becomes a % sign followed by two hexadecimal digits. A space, for example, becomes %20.

URL encoding is also called percent-encoding, because of the % sign.


Why is it Needed?

1. Some characters are not allowed. Spaces and letters like æ, ø, or å cannot go straight into a URL.

2. Some characters have special jobs. In a URL:

  • ? starts a query string
  • & seperates values
  • = connects a name to a value
  • # points to a spot on the page

If your data contains one of these, the browser will misread it.

Browsers encode URLs automatically when you type them or submit a form.

In JavaScript, you can do it yourself, with the encodeURIComponent() function.

Click the "URL Encode" button to see how the JavaScript function encodes the text.



URL Encoding Reference

Your browser will encode input, according to the character-set used in your page. The default character-set in HTML5 is UTF-8.

Character Encoded
space %20 (or + in form data)
! %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
€ %E2%82%AC
 %81
‚ %E2%80%9A
ƒ %C6%92
„ %E2%80%9E
… %E2%80%A6
† %E2%80%A0
‡ %E2%80%A1
ˆ %CB%86
‰ %E2%80%B0
Š %C5%A0
‹ %E2%80%B9
Œ %C5%92
 %C5%8D
Ž %C5%BD
 %8F
 %C2%90
‘ %E2%80%98
' %E2%80%99
“ %E2%80%9C
” %E2%80%9D
• %E2%80%A2
– %E2%80%93
- %E2%80%94
˜ %CB%9C
™ %E2%84
š %C5%A1
› %E2%80
œ %C5%93
 %9D
ž %C5%BE
Ÿ %C5%B8
  %C2%A0
¡ %C2%A1
¢ %C2%A2
£ %C2%A3
¤ %C2%A4
¥ %C2%A5
¦ %C2%A6
§ %C2%A7
¨ %C2%A8
© %C2%A9
ª %C2%AA
« %C2%AB
¬ %C2%AC
­­ %C2%AD
® %C2%AE
¯ %C2%AF
° %C2%B0
± %C2%B1
² %C2%B2
³ %C2%B3
´ %C2%B4
µ %C2%B5
%C2%B6
· %C2%B7
¸ %C2%B8
¹ %C2%B9
º %C2%BA
» %C2%BB
¼ %C2%BC
½ %C2%BD
¾ %C2%BE
¿ %C2%BF
À %C3%80
Á %C3%81
 %C3%82
à %C3%83
Ä %C3%84
Å %C3%85
Æ %C3%86
Ç %C3%87
È %C3%88
É %C3%89
Ê %C3%8A
Ë %C3%8B
Ì %C3%8C
Í %C3%8D
Î %C3%8E
Ï %C3%8F
Ð %C3%90
Ñ %C3%91
Ò %C3%92
Ó %C3%93
Ô %C3%94
Õ %C3%95
Ö %C3%96
× %C3%97
Ø %C3%98
Ù %C3%99
Ú %C3%9A
Û %C3%9B
Ü %C3%9C
Ý %C3%9D
Þ %C3%9E
ß %C3%9F
à %C3%A0
á %C3%A1
â %C3%A2
ã %C3%A3
ä %C3%A4
å %C3%A5
æ %C3%A6
ç %C3%A7
è %C3%A8
é %C3%A9
ê %C3%AA
ë %C3%AB
ì %C3%AC
í %C3%AD
î %C3%AE
ï %C3%AF
ð %C3%B0
ñ %C3%B1
ò %C3%B2
ó %C3%B3
ô %C3%B4
õ %C3%B5
ö %C3%B6
÷ %C3%B7
ø %C3%B8
ù %C3%B9
ú %C3%BA
û %C3%BB
ü %C3%BC
ý %C3%BD
þ %C3%BE
ÿ %C3%BF

Free account

Track your progress

XP earned 0 Day streak 0 Spaces 0 League —

New

Learn in Adventure Mode W3Schools Adventure App

Coding fundamentals as bite-sized lessons and challenges.

×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookies and privacy policy.

Copyright 1999-2026 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.