This tool will URI encode (or percent encode) and decode strings so that they can be used URLs, or in the case of decoding, read by humans.
URI Encoding is a process for encoding information to be used in a URI. It is often known as URL encoding, but it works for the broader category of Uniform Resource Identifiers (URIs) which includes both Uniform Resource Locators (URLs) and Uniform Resource Names (URNs)
URI encoding is necessary because the URI specification RFC3986 allows for only a small subset of US-ASCII characters to be used in as data within URIs without encoding them. These include alphanumeric characters, as well as “-”, “.”, “_“, and “~“.
There is a list of reserved characters that are used in URLs, but they are interpreted special delimiters or otherwise have special semantic meaning. If you want to include them in your URL as plain data, they must be percent encoded.
The reserved characters are: - ! - * - ‘ - ( - ) - ; - : - @ - & - = - + - $ - , - / - ? - # - [ - ]
ASCII Control Characters must also be encoded as these are not printable. These include characters like the newline character and the bell character.
Non-ASCII characters must be encoded because the RFC3986 spec states that URIs consist only of characters in the ASCII charset.
From the RFC:
A percent-encoded octet is encoded as a character triplet, consisting of the percent character “%” followed by the two hexadecimal digits representing that octet’s numeric value. For example, “%20” is the percent-encoding for the binary octet “00100000” (ABNF: %x20), which in US-ASCII corresponds to the space character (SP)