Home

urlencoded

URLencoded refers to the method of encoding data within URLs by replacing certain characters with percent-encoded representations. It is widely used to transmit non-ASCII data and reserved characters in query strings and form data. The encoding method, percent-encoding, converts a byte value to a percent sign followed by two hexadecimal digits. In URIs, unreserved characters (A–Z, a–z, 0–9, and "-", ".", "_", "~") may appear unencoded; all other characters should be percent-encoded. For spaces, application/x-www-form-urlencoded encoding commonly represents them as plus signs (+) in query components of forms, though percent-encoded space (%20) is also valid. In path components, spaces are typically encoded as %20.

In web forms, data submitted via HTTP POST with content type application/x-www-form-urlencoded is encoded with key=value

JavaScript provides encodeURIComponent and encodeURI functions to perform URL encoding; the former encodes most non-URI characters,

Limitations include that URL encoding is not a secure form of encryption; characters in untrusted input should

pairs
joined
by
ampersands,
with
reserved
characters
percent-encoded
and
spaces
often
as
pluses.
For
query
strings
in
URLs,
the
same
encoding
is
used,
and
libraries
vary
whether
they
produce
+
or
%20
for
spaces.
while
the
latter
preserves
URI-reserved
characters.
In
server
and
client
code,
libraries
implement
percent-encoding
with
UTF-8
by
default,
turning
non-ASCII
characters
into
a
sequence
of
bytes
before
percent-encoding
each
byte.
be
validated
and
sanitized.
It
is
defined
by
standards
such
as
RFC
3986
(percent-encoding,
URI
syntax).