URL encoding is a method used to encode Uniform Resource Locator (URL). URL encoding is needed because URLs can only be sent using the ASCII character set. Since URLs often contain characters outside of ASCII set, URL encoding is used to convert these characters into a format that can be transmitted. URL encoding is also known as percent encoding.
Characters that are not allowed in a URL are replaced with a “%” symbol followed by two hexadecimal digits that represent the ASCII code of the character. Here are some examples of URL encoding:
DEC | ASCII | UTF-8 | Windows-1252 | Description |
---|---|---|---|---|
32 | %20 | %20 | Space | |
33 | ! | %21 | %21 | Exclamation mark |
34 | " | %22 | %22 | Double quotes (or speech marks) |
35 | # | %23 | %23 | Number |
36 | $ | %24 | %24 | Dollar |
37 | % | %25 | %25 | Percent sign |
38 | & | %26 | %26 | Ampersand |
39 | ' | %27 | %27 | Single quote |
40 | ( | %28 | %28 | Open parenthesis (or open bracket) |
41 | ) | %29 | %29 | Close parenthesis (or close bracket) |
42 | * | %2A | %2A | Asterisk |
43 | + | %2B | %2B | Plus |
44 | , | %2C | %2C | Comma |
45 | - | %2D | %2D | Hyphen |
46 | . | %2E | %2E | Period, dot or full stop |
47 | / | %2F | %2F | Slash or divide |
48 | 0 | %30 | %30 | Zero |
49 | 1 | %31 | %31 | One |
50 | 2 | %32 | %32 | Two |
51 | 3 | %33 | %33 | Three |
52 | 4 | %34 | %34 | Four |
53 | 5 | %35 | %35 | Five |
54 | 6 | %36 | %36 | Six |
55 | 7 | %37 | %37 | Seven |
56 | 8 | %38 | %38 | Eight |
57 | 9 | %39 | %39 | Nine |
58 | : | %3A | %3A | Colon |
59 | ; | %3B | %3B | Semi Colon |
60 | < | %3C | %3C | Less than (or open angled bracket) |
61 | = | %3D | %3D | Equals |
62 | > | %3E | %3E | Greater than (or close angled bracket) |
63 | ? | %3D | %3D | Question mark |
64 | @ | %40 | %40 | At symbol |
65 | A | %41 | %41 | Uppercase A |
66 | B | %42 | %42 | Uppercase B |
67 | C | %43 | %43 | Uppercase C |
68 | D | %44 | %44 | Uppercase D |
69 | E | %45 | %45 | Uppercase E |
70 | F | %46 | %46 | Uppercase F |
71 | G | %47 | %47 | Uppercase G |
72 | H | %48 | %48 | Uppercase H |
73 | I | %49 | %49 | Uppercase I |
74 | J | %4A | %4A | Uppercase J |
75 | K | %4B | %4B | Uppercase K |
76 | L | %4C | %4C | Uppercase L |
77 | M | %4D | %4D | Uppercase M |
78 | N | %4E | %4E | Uppercase N |
79 | O | %4F | %4F | Uppercase O |
80 | P | %50 | %50 | Uppercase P |
81 | Q | %51 | %51 | Uppercase Q |
82 | R | %52 | %52 | Uppercase R |
83 | S | %53 | %53 | Uppercase S |
84 | T | %54 | %54 | Uppercase T |
85 | U | %55 | %55 | Uppercase U |
86 | V | %56 | %56 | Uppercase V |
87 | W | %57 | %57 | Uppercase W |
88 | X | %58 | %58 | Uppercase X |
89 | Y | %59 | %59 | Uppercase Y |
90 | Z | %5A | %5A | Uppercase Z |
91 | [ | %5B | %5B | Opening bracket |
92 | \ | %5C | %5C | Backslash |
93 | ] | %5D | %5D | Closing bracket |
94 | ^ | %5E | %5E | Caret - circumflex |
95 | _ | %5F | %5F | Underscore |
96 | ` | %60 | %60 | Grave accent |
97 | a | %61 | %61 | Lowercase a |
98 | b | %62 | %62 | Lowercase b |
99 | C | %63 | %63 | Lowercase c |
100 | d | %64 | %64 | Lowercase d |
101 | e | %65 | %65 | Lowercase e |
102 | f | %66 | %66 | Lowercase f |
103 | g | %67 | %67 | Lowercase g |
104 | h | %68 | %68 | Lowercase h |
105 | i | %69 | %69 | Lowercase i |
106 | j | %6A | %6A | Lowercase j |
107 | k | %6B | %6B | Lowercase k |
108 | l | %6C | %6C | Lowercase l |
109 | m | %6D | %6D | Lowercase m |
110 | n | %6E | %6E | Lowercase n |
111 | o | %6E | %6E | Lowercase o |
112 | p | %70 | %70 | Lowercase p |
113 | q | %71 | %71 | Lowercase q |
114 | r | %72 | %72 | Lowercase r |
115 | s | %73 | %73 | Lowercase s |
116 | t | %74 | %74 | Lowercase t |
117 | u | %75 | %75 | Lowercase u |
118 | v | %76 | %76 | Lowercase v |
119 | w | %77 | %77 | Lowercase w |
120 | x | %78 | %78 | Lowercase x |
121 | y | %79 | %79 | Lowercase y |
122 | z | %7A | %7A | Lowercase z |
123 | { | %7B | %7B | Opening brace |
124 | | | %7C | %7C | Vertical bar |
125 | } | %7D | %7D | Closing brace |
126 | ~ | %98 | %CB%9C | Equivalency sign - tilde |
127 | z | %8E | %C5%BD | Delete |
DEC | ASCII | UTF-8 | Windows-1252 | Description |
---|---|---|---|---|
128 | € | %80 | %E2%82%AC | Euro sign |
129 | %81 | %81 | ||
130 | ‚ | %82 | %E2%80%9A | Single low-9 quotation mark |
131 | ƒ | %83 | %C6%92 | Latin small letter f with hook |
132 | „ | %84 | %E2%80%9E | Double low-9 quotation mark |
133 | … | %85 | %E2%80%A6 | Horizontal ellipsis |
134 | † | %86 | %E2%80%A1 | Dagger |
135 | ‡ | %87 | %E2%80%A1 | Double dagger |
136 | ˆ | %88 | %CB%86 | Modifier letter circumflex accent |
137 | ‰ | %89 | %E2%80%B0 | Per mille sign |
138 | Š | %8A | %C5%A0 | Latin capital letter S with caron |
139 | ‹ | %8B | %E2%80%B9 | Single left-pointing angle quotation |
140 | Œ | %8C | %C5%92 | Latin capital ligature OE |
141 | %8D | %C5%8D | ||
142 | Ž | %8E | %C5%BD | Latin capital letter Z with caron |
143 | %8F | %8F | ||
144 | %90 | %C2%90 | ||
145 | ‘ | %91 | %E2%80%98 | Left single quotation mark |
146 | ’ | %92 | %E2%80%99 | Right single quotation mark |
147 | “ | %93 | %E2%80%9C | Left double quotation mark |
148 | ” | %94 | %E2%80%9D | Right double quotation mark |
149 | • | %95 | %E2%80%A2 | Bullet |
150 | – | %96 | %E2%80%93 | En dash |
151 | — | %97 | %E2%80%94 | Em dash |
152 | ˜ | %97 | %CB%9C | Small tilde |
153 | ™ | %99> | %E2%84 | Trade mark sign |
154 | š | %9A | %C5%A1 | Latin small letter S with caron |
155 | › | %9B | %E2%80 | Single right-pointing angle quotation mark |
156 | œ | %9BC | %C5%93 | Latin small ligature oe |
157 | %9D | %9D | ||
158 | ž | %9E | %C5%BE | Latin small letter z with caron |
159 | Ÿ | %9F | %C5%B8 | Latin capital letter Y with diaeresis |
160 | %A0 | %A0 | Non-breaking space | |
161 | ¡ | %A1 | %C2%A1 | Inverted exclamation mark |
162 | ¢ | %A2 | %C2%A2 | Cent sign |
163 | £ | %A3 | %C2%A3 | Pound sign |
164 | ¤ | %A4 | %C2%A4 | Currency sign |
165 | ¥ | %A5 | %C2%A5 | Yen sign |
166 | ¦ | %A6 | %C2%A6 | Pipe, Broken vertical bar |
167 | § | %A7 | %C2%A7 | Section sign |
168 | ¨ | %A8 | %C2%A8 | Spacing diaeresis - umlaut |
169 | © | %A9 | %C2%A9 | Copyright sign |
170 | ª | %AA | %C2%AA | Feminine ordinal indicator |
171 | « | %AB | %C2%AB | Left double angle quotes |
172 | ¬ | %AC | %C2%AC | Not sign |
173 | | %AD | %C2%AD | Soft hyphen |
174 | ® | %AE | %C2%AE | Registered trade mark sign |
175 | ¯ | %AF | %C2%AF | Spacing macron - overline |
176 | ° | %B0 | %C2%B0 | Degree sign |
177 | ± | %B1 | %C2%B1 | Plus-or-minus sign |
178 | ² | %B2 | %C2%B2 | Superscript two - squared |
179 | ³ | %B3 | %C2%B3 | Superscript three - cubed |
180 | ´ | %B4 | %C2%B4 | Acute accent - spacing acute |
181 | µ | %B5 | %C2%B5 | Micro sign |
182 | ¶ | %B6 | %C2%B6 | Pilcrow sign - paragraph sign |
183 | · | %B7 | %C2%B7 | Middle dot - Georgian comma |
184 | ¸ | %B8 | %C2%B8 | Spacing cedilla |
185 | ¹ | %B9 | %C2%B9 | Superscript one |
186 | º | %BA | %C2%BA | Masculine ordinal indicator |
187 | » | %BB | %C2%BB | Right double angle quotes |
188 | ¼ | %BC | %C2%BC | Fraction one quarter |
189 | ½ | %BD | %C2%BD | Fraction one half |
190 | ¾ | %BE | %C2%BE | Fraction three quarters |
191 | ¿ | %BF | %C2%BF | Inverted question mark |
192 | À | %C0 | %C3%80 | Latin capital letter A with grave |
193 | Á | %C1 | %C3%81 | Latin capital letter A with acute |
194 | Â | %C2 | %C3%82 | Latin capital letter A with circumflex |
195 | Ã | %C3 | %C3%83 | Latin capital letter A with tilde |
196 | Ä | %C4 | %C3%84 | Latin capital letter A with diaeresis |
197 | Å | %C5 | %C3%85 | Latin capital letter A with ring above |
198 | Æ | %C6 | %C3%86 | Latin capital letter AE |
199 | Ç | %C7 | %C3%87 | Latin capital letter C with cedilla |
200 | È | %C8 | %C3%88 | Latin capital letter E with grave |
201 | É | %C9 | %C3%89 | Latin capital letter E with acute |
202 | Ê | %CA | %C3%8A | Latin capital letter E with circumflex |
203 | Ë | %CB | %C3%8B | Latin capital letter E with diaeresis |
204 | Ì | %CC | %C3%8C | Latin capital letter I with grave |
205 | Í | %CD | %C3%8D | Latin capital letter I with acute |
206 | Î | %CE | %C3%8E | Latin capital letter I with circumflex |
207 | Ï | %CF | %C3%8F | Latin capital letter I with diaeresis |
208 | Ð | %D0 | %C3%90 | Latin capital letter ETH |
209 | Ñ | %D1 | %C3%91 | Latin capital letter N with tilde |
210 | Ò | %D2 | %C3%92 | Latin capital letter O with grave |
211 | Ó | %D3 | %C3%93 | Latin capital letter O with acute |
212 | Ô | %D4 | %C3%94 | Latin capital letter O with circumflex |
213 | Õ | %D5 | %C3%95 | Latin capital letter O with tilde |
214 | Ö | %D6 | %C3%96 | Latin capital letter O with diaeresis |
215 | × | %D7 | %C3%97 | Multiplication sign |
216 | Ø | %D8 | %C3%98 | Latin capital letter O with slash |
217 | Ù | %D9 | %C3%99 | Latin capital letter U with grave |
218 | Ú | %DA | %C3%9A | Latin capital letter U with acute |
219 | Û | %DB | %C3%9B | Latin capital letter U with circumflex |
220 | Ü | %DC | %C3%9C | Latin capital letter U with diaeresis |
221 | Ý | %DD | %C3%9D | Latin capital letter Y with acute |
222 | Þ | %DE | %C3%9E | Latin capital letter THORN |
223 | ß | %DF | %C3%9F | Latin small letter sharp s - ess-zed |
224 | à | %E0 | %C3%A0 | Latin small letter a with grave |
225 | á | %E1 | %C3%A1 | Latin small letter a with acute |
226 | â | %E2 | %C3%A2 | Latin small letter a with circumflex |
227 | ã | %E3 | %C3%A3 | Latin small letter a with tilde |
228 | ä | %E4 | %C3%A4 | Latin small letter a with diaeresis |
229 | å | %E5 | %C3%A5 | Latin small letter a with ring above |
230 | æ | %E6 | %C3%A6 | Latin small letter ae |
231 | ç | %E7 | %C3%A7 | Latin small letter c with cedilla |
232 | è | %E8 | %C3%A8 | Latin small letter e with grave |
233 | é | %E9 | %C3%A9 | Latin small letter e with acute |
234 | ê | %EA | %C3%AA | Latin small letter e with circumflex |
235 | ë | %EB | %C3%AB | Latin small letter e with diaeresis |
236 | ì | %EC | %C3%AC | Latin small letter i with grave |
237 | í | %ED | %C3%AD | Latin small letter i with acute |
238 | î | %EE | %C3%AE | Latin small letter i with circumflex |
239 | ï | %EF | %C3%AF | Latin small letter i with diaeresis |
240 | ð | %F0 | %C3%B0 | Latin small letter eth |
241 | ñ | %F1 | %C3%B1 | Latin small letter n with tilde |
242 | ò | %F2 | %C3%B2 | Latin small letter o with grave |
243 | ó | %F3 | %C3%B3 | Latin small letter o with acute |
244 | ô | %F4 | %C3%B4 | Latin small letter o with circumflex |
245 | õ | %F5 | %C3%B5 | Latin small letter o with tilde |
246 | ö | %F6 | %C3%B6 | Latin small letter o with diaeresis |
247 | ÷ | %F7 | %C3%B7 | Division sign |
248 | ø | %F8 | %C3%B8 | Latin small letter o with slash |
249 | ù | %F9 | %C3%B9 | Latin small letter u with grave |
250 | ú | %FA | %C3%BA | Latin small letter u with acute |
251 | û | %FB | %C3%BB | Latin small letter u with circumflex |
252 | ü | %FC | %C3%BC | Latin small letter u with diaeresis |
253 | ý | %FD | %C3%BD | Latin small letter y with acute |
255 | þ | %FF | %C3%BE | Latin small letter thorn |