Background

URL Encode and decode

Encode completely offline

Tools to do exactly what it says: URL encoding and decoding quickly and easily. Easily URL encode or decode your data into a human-readable format.


Download for Windows
URL encode decode
Background

What is URL encoding?

URL encoding, also known as "percent encoding", is a mechanism for encoding information in a Uniform Resource Identifier (URI). Although it is called URL encoding, it is actually more commonly used in the main Uniform Resource Identifier (URI) set, which includes Uniform Resource Locator (URL) and Uniform Resource Name (URN). Therefore, it is also used to prepare data of the "application/x-www-form-urlencoded" media type, which is usually used to submit HTML form data in an HTTP request.

Types of URI characters The characters allowed in a URI are either reserved or unreserved (or a percent character as part of a percent-encoding). Reserved characters are 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 special 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 new revision of specifications that govern URIs and URI schemes.

Character data

The process of percent encoding binary data is often extrapolated, sometimes inappropriate or not fully specified, to apply to character-based data. In the days when the World Wide Web was formed, it was relatively harmless when processing data characters in the ASCII code table and using their corresponding bytes in ASCII as the basis for determining the percentage encoding sequence; many people believed that characters and bytes It is one-to-one mapping and interchangeable. However, the need to represent characters outside the ASCII range is growing rapidly, and URI schemes and protocols often fail to provide standard rules for preparing character data for inclusion in URIs. As a result, web applications began to use different multi-byte, stateful, and other non-ASCII compatible encodings as the basis for percent encoding, resulting in ambiguity and difficulty in interpreting URIs reliably.

Percent-encoding unreserved characters


Percent-encoding unreserved characters

The characters in the unreserved set never need to be percent-encoded. The only difference is that whether unreserved characters are percent-encoded URIs are equivalent by definition, but the URI processor may not always treat them equivalently in practice. For example, URI users should not distinguish between "%41" and "A" ("%41" is the percentage code of "A") or "%7E" and "~", but some people do. Therefore, in order to maximize interoperability, URI producers are not encouraged to percentage-encode non-reserved characters.

Percent-encoding the percent character

Because the percent ("%") character is used as an indicator of percent-encoded octets, it must be percent-encoded as "%25" to use that octet as data in the URI.

Percent-encoding arbitrary data

Most URI schemes involve the representation of arbitrary data, such as IP addresses or file system paths, as part of the URI. The URI scheme specification should (but usually does not) provide an explicit mapping between URI characters and all possible data values ​​represented by these characters.

Download for Windows