URL Encode / Decode
Use the tool below to encode or decode data to and from a URL-compatible format. To ensure data safety, the encoding and decoding are performed within the browser without being sent across the internet.
Use the tool below to encode or decode data to and from a URL-compatible format. To ensure data safety, the encoding and decoding are performed within the browser without being sent across the internet.
URL encoding is a way to convert data into a format that can be safely included in a URL. URLs can only safely contain certain US-ASCII characters, which are limited to letters, numbers, and a few symbols. Data that contains other characters—such as spaces, punctuation, or non-English characters—needs to be encoded to ensure that browsers and servers interpret it correctly. URL encoding of these incompatible characters is achieved by replacing them with a percent sign (%) followed by two hexadecimal digits representing the character's byte value. For example, '^' is encoded as '%5E', and '<' is encoded as '%3C'. Unicode or other characters that occupy more than one byte are first converted into a sequence of bytes (typically using UTF-8) and then represented by a percent sign (%) followed by two hexadecimal digits for each byte. For example, 'Ω' is encoded as '%CE%A9', and 'β' is encoded as '%CE%B2'.
Because URL encoding uses the percent sign, it is also called percent-encoding. This encoding method is not limited to URLs; therefore, the term percent-encoding should be preferred.
The US-ASCII characters allowed in a URL are categorized as either reserved or unreserved. Reserved characters have special meanings in a URL, while unreserved characters do not. Based on RFC 3986, the reserved characters are:
!#\$&'()*+,/:;=?@[]
and the unreserved characters are:
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~
When reserved characters are used for their intended meanings in a URL, they do not need to be encoded. However, when used for other purposes, they need to be percent-encoded to distinguish them from their reserved meanings. For example, in the URL:
https://www.calculator.net/url-encode-decode.html?toprocess=encode%20%2F%20and%20%3F
the '/' is not encoded when serving as a path delimiter, and '?' is not encoded when indicating the start of the query string. However, they are encoded as '%2F' and '%3F' when used as part of the data in the value of 'encode / and ?' for the parameter 'toprocess'.
Unreserved characters can be used directly in URLs in all situations without being percent-encoded. Characters that are not in either category must be percent-encoded to be used safely in URLs.
There are numerous online and offline tools available to encode and decode data to and from a URL-safe format. Our tool above provides a convenient way to perform these conversions directly in the browser without sending data over the internet.