URL Encoder & Decoder
Percent-encode URLs and query parameters or decode them back to plain text. All processing happens in your browser.
Frequently Asked Questions
% followed by two hex digits. For example, a space becomes %20 and & becomes %26. It ensures URLs are transmitted correctly over the internet.encodeURIComponent encodes everything except letters, digits, and - _ . ! ~ * ' ( ) — use it for query string values. encodeURI does not encode characters that form the URL structure (: / ? # [ ] @ ! $ & ' ( ) * + , ; =) — use it to encode a complete URL.How URL Encoding Works
Percent-encoding ensures every character in a URL can be safely transmitted over the internet regardless of the transport layer's character restrictions.
Scan Characters
Each character is checked against the RFC 3986 "unreserved" set: letters (A–Z, a–z), digits (0–9), and - _ . ~. All other characters require encoding.
Convert to UTF-8 Bytes
Each unsafe character is converted to its UTF-8 byte sequence. Non-ASCII characters like € expand to multiple bytes (e.g., 3 bytes for most European/Asian characters).
Percent-Encode Each Byte
Each byte is written as %XX where XX is the uppercase hexadecimal value. For example, a space (0x20) becomes %20 and & (0x26) becomes %26.
Common Use Cases
API Query String Building
When constructing API requests with dynamic parameter values, every value must be percent-encoded before appending to the URL. Missing this step causes broken requests when values contain &, =, or spaces.
OAuth Redirect URIs
OAuth 2.0 flows pass a redirect_uri as a query parameter. The URI must be fully percent-encoded before embedding, otherwise the OAuth server may reject or misparse it.
HTML Form Submissions
Browsers automatically encode form values, but when building forms programmatically with JavaScript or constructing application/x-www-form-urlencoded bodies manually, you must encode each value.
Deep Links with Parameters
Mobile app deep links and share URLs often embed titles, descriptions, or full URLs as parameters. Encoding these prevents the nested URL from breaking the outer URL's structure.
Decoding Encoded URLs
Log files and analytics platforms often display percent-encoded URLs. Use this decoder to convert %2F, %3D, and other sequences back to human-readable text for quick inspection.
Internationalized Domain Names
URLs containing non-ASCII characters (Arabic, Chinese, accented Latin) must be percent-encoded in the path and query. This tool helps verify the correct encoding before embedding in links.