Encode or decode URL-encoded text

Encode or decode URL-encoded text quickly with our efficient tool. Save time on any task.

Encode or decode URL-encoded text with our efficient tool. Save time on any task with our reliable solution.

Write or paste your text in the box below


URL Encode and Decode Tool

Use the online tool from above to either encode or decode a string of text. The process involves converting the character string into bytes using UTF-8 encoding and replacing each non-ASCII byte with %HH, where HH is the hexadecimal value of the byte. For example, "François" would be encoded as "Fran%C3%A7ois".

What is URL encoding?

URL encoding, also known as percent-encoding, replaces certain characters in a URL or other URIs with character triplets consisting of "%" followed by two hexadecimal digits representing the character's numeric value. It applies not only to URLs (Uniform Resource Locators) but also to other URIs such as URNs (Uniform Resource Names).

Which Characters Are Allowed in a URL?

A URL allows either reserved or unreserved characters (or percent characters as part of percent-encoding). Reserved characters sometimes have special meanings, while unreserved characters have no such meaning. Reserved characters that need to be represented are done so using percent-encoding. The sets of reserved and unreserved characters have undergone slight changes with URI specification revisions. According to RFC 3986, URLs should only use a defined set of unreserved and reserved ASCII characters, excluding any other characters.

Encoding/Decoding a Piece of Text

RFC 3986 does not specify the character encoding table for non-ASCII characters like umlauts (ä, ö, ü) during URL encoding. While it is theoretically possible to use an 8-bit code page (e.g., ISO-8859-1), handling different language-specific code pages can be cumbersome. Additionally, some languages do not fit into an 8-bit code page, such as Chinese. RFC 3629 proposes using the UTF-8 character encoding table for non-ASCII characters. The provided tool considers this and allows choosing between the ASCII and UTF-8 character encoding tables, issuing a warning if non-ASCII characters are detected in the URL encoded/decoded text.

When and why would you use URL encoding?

URL encoding is commonly used when submitting data from HTML forms through HTTP requests. Form field names and values are encoded and sent to the server using the URI percent-encoding rules. The encoding includes modifications like newline normalization and replacing spaces with "+". The encoded data has the MIME type "application/x-www-form-urlencoded" and is included in the query component of an HTTP GET request or the body of an HTTP POST request or email. The CGI specification outlines how web servers decode this data and make it available to applications.