URL Percent Encoder & Decoder

Safely encode and decode URI components in accordance with RFC 3986.

URL Percent Encoder & Decoder

Input Text or URL
Encoded / Decoded Output

What is Percent-Encoding (URL Encoding)?

Percent-encoding, defined in IETF RFC 3986, is the standard mechanism for encoding arbitrary characters within a Uniform Resource Identifier (URI). Characters like spaces, question marks (?), ampersands (&), slashes (/), and equals signs (=) have structural syntactical roles within a URL.

When passing dynamic user data (e.g. search queries, email addresses, redirect destination URLs) as query string parameters, these special characters must be converted into their percent-encoded equivalents. Failure to properly percent-encode parameters leads to severed query strings, server 404/500 routing errors, and HTTP parameter pollution vulnerabilities.

Zero Server Ingestion All encoding and decoding transformations take place locally inside your browser's JavaScript runtime engine. No destination URLs, query parameters, or authorization codes are transmitted to our servers.

ASCII Character Percent-Encoding Reference Table

Character Hex Value Percent-Encoded Syntactic Role in URLs
Space 0x20 %20 Disallowed in raw URLs; separates tokens.
? 0x3F %3F Delimits the start of the query string.
& 0x26 %26 Separates individual key-value query parameters.
= 0x3D %3D Assigns a value to a parameter key.
/ 0x2F %2F Delimits path hierarchy segments.
# 0x23 %23 Delimits client-side fragment identifiers (hash).

Programmatic URL Encoding in Code

JavaScript (Component Level)

const searchQuery = "React & Node.js Guide?";
const safeUrl = `https://api.example.com/search?q=${encodeURIComponent(searchQuery)}`;
console.log(safeUrl);
// Output: https://api.example.com/search?q=React%20%26%20Node.js%20Guide%3F

Python 3 (urllib.parse)

import urllib.parse

param = "hello world & foo=bar"
encoded = urllib.parse.quote(param, safe='')
print("Encoded:", encoded)

decoded = urllib.parse.unquote(encoded)
print("Decoded:", decoded)

Frequently Asked Questions

What characters are never encoded in URLs?
According to RFC 3986, the 'unreserved' character set is never modified by percent-encoding. This set consists of uppercase letters (A-Z), lowercase letters (a-z), decimal digits (0-9), hyphen (-), underscore (_), period (.), and tilde (~).
Can URL encoding handle non-Latin alphabets and emojis?
Yes. Under RFC 3986, non-ASCII characters are first converted to their UTF-8 byte sequences, and then each byte is percent-encoded. For example, the emoji 🚀 (4 bytes in UTF-8) becomes '%F0%9F%99%80'.