The Complete Guide to URL Encoding and Decoding: Percent-Encoding & Query Strings
Master URL encoding and decoding. Understand percent-encoding rules, RFC 3986 standards, query parameter formatting, and browser security.
Overview
URL encoding (formally known as Percent-Encoding) is a standard mechanism defined in RFC 3986 for encoding information within a Uniform Resource Identifier (URI). When URLs include reserved punctuation, non-ASCII characters, spaces, or international symbols, they must be converted into safe percent-encoded triplets.
Our URL Encoder / Decoder allows instant, 100% client-side conversion between plain text, query strings, and encoded URLs.
Reserved vs. Unreserved Characters
RFC 3986 divides characters into two primary sets:
1. Unreserved Characters
These characters never require encoding and have identical meanings in any URL:A-Z, a-z)0-9)-), Underscore (_), Period (.), Tilde (~)2. Reserved Characters
These characters carry specific syntactic roles in URI parsing:/) define path hierarchies.?) denotes the beginning of the query string.&) and Equals (=) delimit key-value parameter pairs.#) marks document fragment identifiers.When user input contains reserved characters as raw data values (such as an email address like user+tag@domain.com or an ampersand inside a query value), they must be converted to %XX hexadecimal ASCII codes.
Common Percent-Encoding Replacements
| Character | Meaning / Usage | Encoded Value |
|:---:|:---|:---:|
| Space | Whitespace | %20 |
| ! | Exclamation mark | %21 |
| # | Fragment anchor | %23 |
| $ | Dollar sign | %24 |
| & | Query separator | %26 |
| + | Plus symbol | %2B |
| / | Path separator | %2F |
| : | Scheme/port delimiter | %3A |
| = | Key-value assignment | %3D |
| ? | Query start | %3F |
| @ | Userinfo delimiter | %40 |
encodeURI vs. encodeURIComponent in JavaScript
Ready to calculate or convert?
Use our zero-install, private url encoder & decoder directly inside your browser. No registration required.