URL Encode / Decode
PrintTransmitting query parameters, submitting web forms, or sharing URLs containing spaces, punctuation, or non-English characters can disrupt browser routing. Because the Uniform Resource Locator (URL) standard only recognizes a specific subset of ASCII characters, incompatible symbols must be converted before transmission.
Our free online URL Encode / Decode tool translates text strings into URL-safe formats instantly.
*Security Guarantee: All encoding and decoding actions run locally inside your browser using client-side JavaScript. Your data is never transmitted over the network or saved to our servers.
How URL Encoding (Percent-Encoding) Works
URL encoding, also known as percent-encoding, is a method used to convert query data into a format that complies with official web specifications.
To achieve this, any incompatible character is replaced by a percent sign (%) followed by two hexadecimal digits representing the character’s ASCII byte value.
- Standard ASCII Symbols: The caret symbol (
^) becomes%5E, and the less-than sign (<) becomes%3C. - Multibyte Unicode Characters: Characters that span multiple bytes (like letters from non-Latin alphabets or mathematical symbols) are first converted into a sequence of UTF-8 bytes, and then each byte is percent-encoded. For example, the Greek letter Omega (
Ω) is encoded as%CE%A9, and Beta (β) is encoded as%CE%B2.
RFC 3986 Standard: Reserved vs. Unreserved Characters
The official internet standard RFC 3986 divides ASCII characters inside a URL into two distinct categories:
1. Reserved Characters
Reserved characters have designated syntax meanings inside a URL (such as separating query variables, directory paths, or protocol types). The reserved character set includes:
! # $ & ' ( ) * + , / : ; = ? @ [ ]
When these characters are used for their intended syntax roles, they must not be encoded. For example, in the URL path, the slash (/) acts as a directory divider, and the question mark (?) starts a query parameter list.
However, if a reserved character is used as actual data inside a query value, it must be percent-encoded to prevent the browser from misinterpreting it as syntax. For example, in the query string:
https://www.calculator.rank/url-encode-decode.html?toprocess=encode%20%2F%20and%20%3F
The slash and question mark values inside the parameter are encoded as %2F and %3F to preserve them as plain text data.
2. Unreserved Characters
Unreserved characters have no structural meaning in a URL and are always safe to use directly without encoding. The unreserved character set includes:
A-Z, a-z, 0-9, hyphen (-), period (.), underscore (_), and tilde (~).
Any character that is not unreserved or serving a correct syntax role must be percent-encoded to prevent transmission errors.
To convert data to Base64 formats, visit our Base64 Encode / Decode tool. To convert IP ranges, use the IP Subnet Calculator. For base-16 conversions, use the Hex Calculator.
Frequently Asked Questions (FAQ)
What is the difference between URL encoding and percent-encoding?
The terms are synonymous. While “URL encoding” is the most common industry term because of its role in web browsers, the official technical standard refers to the process as “percent-encoding” because it relies on the percent symbol (%) as an escape character.
Why are spaces sometimes encoded as %20 and other times as a plus sign (+)?
In standard URL paths (the address portion before the ?), spaces must be encoded as %20. In query strings (the parameter data portion after the ?), standard web forms traditionally encode spaces as a plus sign (+) using the application/x-www-form-urlencoded media type. Both formats are widely supported by web servers.
Do I need to encode numbers in a URL?
No. Standard Arabic numerals (0-9) are classified as unreserved characters under RFC 3986, meaning they can always be used directly without being percent-encoded.
How does percent-encoding handle Unicode?
Percent-encoding is strictly byte-based. To encode a Unicode character, the system first translates the character into its binary UTF-8 byte sequence (which can be 2 to 4 bytes long) and then converts each individual byte into its corresponding percent-hexadecimal string.