URLDecode and Encode Tool

Search Engine Optimization

URL Encoder / Decoder

Enter the text that you wish to encode or decode:

About URL Encoder / Decoder

Don't Know How to URLDecode or Encode? This Tool Does It All For You


URL Encode and Decode Tool

Use the online tool above to encode or decode a string of text. For interoperability between websites on an international basis, URL's ought to be encoded uniformly. To map the immense range of characters used worldwide into the 60 or so allowed characters in a URI, a two-step process is favored.

Use UTF-8 to encode each byte that is not a letter or digit as HH, where the hexadecimal value of HH is the byte's value. For example, the string "France" would be encoded as "France C3 A7ois."

(The " is encoded in UTF-8 as two bytes C3 (hex) and A7 (hex), which are then written as the three characters " c3" and " a7" respectively.) This ASCII character can make a URI rather long (up to nine characters for a single Unicode character), but web browsers generally only need to display the decoded form, and programs can send UTF-8 without the HH escape sequences.

What is URL encoding?

URL encoding stands for encoding characters in a URL with one or more character triplets that include the percent symbol followed by a two hexadecimal digits. The two hexadecimal digits of the triplet(s) represent the numeric value of the replaced character.

The term URL encoding is somewhat imprecise because the encoding procedure is not limited to URLs (Uniform Resource Locators), but can also be applied to other URIs
 (Uniform Resource Identifiers), including URNs (Uniform Resource Names). Therefore, the term percent-encoding is preferable.

Which Characters Are Allowed in a URL?

The characters in a URL 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, while unreserved characters have no such meaning. Using percent-encoding, characters which otherwise would not be allowed are represented using allowed characters. The meanings of the two sets of reserved and unreserved system characters and the circumstances under which certain reserved characters have special meanings have changed moderately with each revision of specifications that govern URIs and URI schemes.

RFC 3986 stipulates that characters in a URL in order to be considered reserved or unreserved must be consistent with the RFC 3986 characters table. Any other character is not allowed in a URL.

The unreserved characters can be encoded, but should not be encoded. The unreserved characters are:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 - _ . ~

The reserved characters have to be encoded only under certain circumstances. The reserved characters are:

! * ' ( ) ; : @ & = + $ , / ? % # [ ]

Encoding/Decoding a Piece of Text
RFC 3986 does not define with regards to which character encoding table non-ASCII characters may be encoded. As URL encoding features a pair of hexadecimal digits, and as a pair of hexadecimal digits equals eight bits, it would theoretically be the potential to round one of the 8-bit code pages for non-ASCII characters (e.g. ISO-8859-1 for umlauts).

On the other hand, managing all these different languages with 8-bit code pages is a daunting job. Since some foreign languages do not even fit into an 8-bit code page (e.g. Chinese), RFC 3629 proposes to use the UTF-8 character table for non-ASCII characters. 

When generating this page, the tool takes this into account and usually allows you to choose between ASCII encoding and UTF-8 encoding. If you select the ASCII character encoding table, a warning dialog will pop up if the URL decoded text contains non-ASCII characters.

When and why would you use URL encoding?

When HTML coded data from fields is submitted, the form field names and values are encoded and sent using  method GET or POST, or historically, via email. The encoding used for the default is based on a very outdated edition of the general URI percent-encoding rules, with the addition of modifications such as newline normalization and eliminating spaces with " " rather than "20". The MIME type of data encoded this way is application x-www-form-urlencoded, and it is currently specified in HTML and XForms.CGI specification contains instructions for how web servers decode data of this type and make it available to applications.

When sent in an HTTP GET request, application x-www-form-urlencoded data is in the query part of the request URL. When sent in an HTTP POST request or  by email, the 
data is placed in the body of the message, and the name of the media type is included in the message's Content-Type header.