WEB ONLINE CENTER - ONE STEP SOLUTION FOR ALL...

URL Encoding Characters

When data is submitted from one page to another page via GET or POST method, it should be encoded. Each character has some unique URL encoding character assigned to it. Browser will encode the URL according to character set used in the page. Default character set in HTML5 is UTF-8. Below is the list of characters along with their URL encoded strings. Characters can be encoded using URL Encode & to decode the characters you can use URL Decode.

Character Windows-1252 UTF-8
space0.20.2
!0.210.21
"0.220.22
#0.230.23
$0.240.24
%0.250.25
&0.260.26
'0.270.27
(0.280.28
)0.290.29
*%2A%2A
+%2B%2B
,%2C%2C
-%2D%2D
.%2E%2E
/%2F%2F
00.30.3
10.310.31
20.320.32
30.330.33
40.340.34
50.350.35
60.360.36
70.370.37
80.380.38
90.390.39
:%3A%3A
;%3B%3B
<%3C%3C
=%3D%3D
>%3E%3E
?%3F%3F
@0.40.4
A0.410.41
B0.420.42
C0.430.43
D0.440.44
E0.450.45
F0.460.46
G0.470.47
H0.480.48
I0.490.49
J%4A%4A
K%4B%4B
L%4C%4C
M%4D%4D
N%4E%4E
O%4F%4F
P0.50.5
Q0.510.51
R0.520.52
S0.530.53
T0.540.54
U0.550.55
V0.560.56
W0.570.57
X0.580.58
Y0.590.59
Z%5A%5A
[%5B%5B
\%5C%5C
]%5D%5D
^%5E%5E
_%5F%5F
`0.60.6
a0.610.61
b0.620.62
c0.630.63
d0.640.64
e0.650.65
f0.660.66
g0.670.67
h0.680.68
i0.690.69
j%6A%6A
k%6B%6B
l%6C%6C
m%6D%6D
n%6E%6E
o%6F%6F
p0.70.7
q0.710.71
r0.720.72
s0.730.73
t0.740.74
u0.750.75
v0.760.76
w0.770.77
x0.780.78
y0.790.79
z%7A%7A
{%7B%7B
|%7C%7C
}%7D%7D
~%7E%7E
%7F%7F
`0.8%E2%82%AC
0.810.81
0.82%E2%80%9A
ƒ0.83%C6%92
0.84%E2%80%9E
0.85%E2%80%A6
0.86%E2%80%A0
0.87%E2%80%A1
ˆ0.88%CB%86
0.89%E2%80%B0
Š%8A%C5%A0
%8B%E2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4
å%E5%C3%A5
æ%E6%C3%A6
ç%E7%C3%A7
è%E8%C3%A8
é%E9%C3%A9
ê%EA%C3%AA
ë%EB%C3%AB
ì%EC%C3%AC
í%ED%C3%AD
î%EE%C3%AE
ï%EF%C3%AF
ð%F0%C3%B0
ñ%F1%C3%B1
ò%F2%C3%B2
ó%F3%C3%B3
ô%F4%C3%B4
õ%F5%C3%B5
ö%F6%C3%B6
÷%F7%C3%B7
ø%F8%C3%B8
ù%F9%C3%B9
ú%FA%C3%BA
û%FB%C3%BB
ü%FC%C3%BC
ý%FD%C3%BD
þ%FE%C3%BE
ÿ%FF%C3%BF

NOTE: Below are some of the ASCII control characters, which were originally designed to control hardware devices. They are not actually part of the URLs.

ASCII Character Description URL-encoding
NULnull character0
SOHstart of header0.01
STXstart of text0.02
ETXend of text0.03
EOTend of transmission0.04
ENQenquiry0.05
ACKacknowledge0.06
BELbell (ring)0.07
BSbackspace0.08
HThorizontal tab0.09
LFline feed%0A
VTvertical tab%0B
FFform feed%0C
CRcarriage return%0D
SOshift out%0E
SIshift in%0F
DLEdata link escape0.1
DC1device control 10.11
DC2device control 20.12
DC3device control 30.13
DC4device control 40.14
NAKnegative acknowledge0.15
SYNsynchronize0.16
ETBend transmission block0.17
CANcancel0.18
EMend of medium0.19
SUBsubstitute%1A
ESCescape%1B
FSfile separator%1C
GSgroup separator%1D
RSrecord separator%1E
USunit separator%1F

Other Information

Percent-encoding, also known as URL encoding, is a mechanism for encoding information in a Uniform Resource Identifier (URI) under certain circumstances. Although it is known as URL encoding it is, in fact, used more generally within the main Uniform Resource Identifier (URI) set, which includes both Uniform Resource Locator (URL) and Uniform Resource Name (URN). As such, it is also used in the preparation of data of the application/x-www-form-urlencoded media type, as is often used in the submission of HTML form data in HTTP requests.

The characters allowed in a URI are either reserved or unreserved (or a percent character as part of a percent-encoding). Reserved characters are those characters that sometimes have special meaning. For example, forward slash characters are used to separate different parts of a URL (or more generally, a URI). Unreserved characters have no such meanings. Using percent-encoding, reserved characters are represented using special character sequences. The sets of reserved and unreserved characters and the circumstances under which certain reserved characters have special meaning have changed slightly with each revision of specifications that govern URIs and URI schemes.

When a character from the reserved set (a "reserved character") has special meaning (a "reserved purpose") in a certain context, and a URI scheme says that it is necessary to use that character for some other purpose, then the character must be percent-encoded. Percent-encoding a reserved character involves converting the character to its corresponding byte value in ASCII and then representing that value as a pair of hexadecimal digits. The digits, preceded by a percent sign (%) which is used as an escape character, are then used in the URI in place of the reserved character. (For a non-ASCII character, it is typically converted to its byte sequence in UTF-8, and then each byte value is represented as above.)

The reserved character /, for example, if used in the "path" component of a URI, has the special meaning of being a delimiter between path segments. If, according to a given URI scheme, / needs to be in a path segment, then the three characters %2F or %2f must be used in the segment instead of a raw /.

Reserved characters that have no reserved purpose in a particular context may also be percent-encoded but are not semantically different from those that are not.

In the "query" component of a URI (the part after a ? character), for example, / is still considered a reserved character but it normally has no reserved purpose, unless a particular URI scheme says otherwise. The character does not need to be percent-encoded when it has no reserved purpose.

URIs that differ only by whether a reserved character is percent-encoded or appears literally are normally considered not equivalent (denoting the same resource) unless it can be determined that the reserved characters in question have no reserved purpose. This determination is dependent upon the rules established for reserved characters by individual URI schemes.

Characters from the unreserved set never need to be percent-encoded.

URIs that differ only by whether an unreserved character is percent-encoded or appears literally are equivalent by definition, but URI processors, in practice, may not always recognize this equivalence. For example, URI consumers shouldn't treat %41 differently from A or %7E differently from ~, but some do. For maximum interoperability, URI producers are discouraged from percent-encoding unreserved characters.

Because the percent character ( % ) serves as the indicator for percent-encoded octets, it must be percent-encoded as %25 for that octet to be used as data within a URI.

Most URI schemes involve the representation of arbitrary data, such as an IP address or file system path, as components of a URI. URI scheme specifications should, but often don't, provide an explicit mapping between URI characters and all possible data values being represented by those characters.

Since the publication of RFC 1738 in 1994 it has been specified that schemes that provide for the representation of binary data in a URI must divide the data into 8-bit bytes and percent-encode each byte in the same manner as above.[1] Byte value 0x0F, for example, should be represented by %0F, but byte value 0x41 can be represented by A, or %41. The use of unencoded characters for alphanumeric and other unreserved characters is typically preferred as it results in shorter URLs.

The procedure for percent-encoding binary data has often been extrapolated, sometimes inappropriately or without being fully specified, to apply to character-based data. In the World Wide Web's formative years, when dealing with data characters in the ASCII repertoire and using their corresponding bytes in ASCII as the basis for determining percent-encoded sequences, this practice was relatively harmless; it was just assumed that characters and bytes mapped one-to-one and were interchangeable. The need to represent characters outside the ASCII range, however, grew quickly and URI schemes and protocols often failed to provide standard rules for preparing character data for inclusion in a URI. Web applications consequently began using different multi-byte, stateful, and other non-ASCII-compatible encodings as the basis for percent-encoding, leading to ambiguities and difficulty interpreting URIs reliably.

For example, many URI schemes and protocols based on RFCs 1738 and 2396 presume that the data characters will be converted to bytes according to some unspecified character encoding before being represented in a URI by unreserved characters or percent-encoded bytes. If the scheme does not allow the URI to provide a hint as to what encoding was used, or if the encoding conflicts with the use of ASCII to percent-encode reserved and unreserved characters, then the URI cannot be reliably interpreted. Some schemes fail to account for encoding at all, and instead just suggest that data characters map directly to URI characters, which leaves it up to implementations to decide whether and how to percent-encode data characters that are in neither the reserved nor unreserved sets.

Arbitrary character data is sometimes percent-encoded and used in non-URI situations, such as for password obfuscation programs, or other system-specific translation protocols.

The generic URI syntax recommends that new URI schemes that provide for the representation of character data in a URI should, in effect, represent characters from the unreserved set without translation, and should convert all other characters to bytes according to UTF-8, and then percent-encode those values. This suggestion was introduced in January 2005 with the publication of RFC 3986. URI schemes introduced before this date are not affected.

Not addressed by the current specification is what to do with encoded character data. For example, in computers, character data manifests in encoded form, at some level, and thus could be treated as either binary or character data when being mapped to URI characters. Presumably, it is up to the URI scheme specifications to account for this possibility and require one or the other, but in practice, few, if any, actually do.

There exists a non-standard encoding for Unicode characters: %uxxxx, where xxxx is a UTF-16 code unit represented as four hexadecimal digits. This behavior is not specified by any RFC and has been rejected by the W3C. The eighth edition of ECMA-262 still includes an escape function that uses this syntax, along with encodeURI and encodeURIComponent functions, which apply UTF-8 encoding to a string, then percent-escape the resulting bytes.

When data that has been entered into HTML forms is submitted, the form field names and values are encoded and sent to the server in an HTTP request message using method GET or POST, or, historically, via email. The encoding used by default is based on an early version of the general URI percent-encoding rules, with a number of modifications such as newline normalization and replacing spaces with + instead of %20. The media type of data encoded this way is application/x-www-form-urlencoded, and it is currently defined (still in a very outdated manner) in the HTML and XForms specifications. In addition, the CGI specification contains rules for how web servers decode data of this type and make it available to applications.

When HTML form data is sent in an HTTP GET request, it is included in the query component of the request URI using the same syntax described above. When sent in an HTTP POST request or via email, the data is placed in the body of the message, and application/x-www-form-urlencoded is included in the message's Content-Type header.

Reference: https://en.wikipedia.org/