Encode special characters in URLs and decode encoded URLs. Full URL parser with query parameter breakdown.
| Character | Encoded | Description |
|---|
URLs (Uniform Resource Locators) are subject to a strict character set defined by RFC 3986. Only a small subset of ASCII characters — letters, digits, and a handful of punctuation marks — are allowed in URLs without encoding. Every other character must be "percent-encoded": replaced with a % sign followed by the character's two-digit hexadecimal ASCII code. A space becomes %20, a # becomes %23, an ampersand (&) in a query value becomes %26.
This encoding requirement creates two common developer and marketer tasks: (1) encoding a string that contains special characters before inserting it into a URL query parameter, and (2) decoding a URL-encoded string to see its human-readable content. This tool handles both directions instantly.
URLs have structural characters that carry special meaning:
| Character | Structural Meaning in URLs | Encoded Form (when used as data) |
|---|---|---|
| & (ampersand) | Separates query parameters | %26 |
| = (equals) | Separates key from value | %3D |
| ? (question mark) | Starts query string | %3F |
| # (hash) | Fragment identifier (anchor) | %23 |
| (space) | Invalid in URLs | %20 (or + in form data) |
| / (slash) | Path separator | %2F |
If a search query contains "&" (as in "AT&T") and it's inserted into a URL parameter without encoding, the URL parser treats the & as a parameter separator and splits the query incorrectly. Encoding to "AT%26T" makes the intent unambiguous.
JavaScript has two URL encoding functions with importantly different scopes:
This tool's "Encode for Query Parameter" mode uses encodeURIComponent behaviour. "Encode Full URL" mode uses encodeURI behaviour.
Both represent a space, but in different contexts. %20 is the standard percent-encoding for a space in any URL context. The + character is used to represent a space specifically in application/x-www-form-urlencoded format (HTML form data submitted via POST or as query strings). Modern servers typically accept both, but %20 is the safer, standards-compliant choice for URLs.
These are percent-encoded UTF-8 characters. %E2%80%99 is the UTF-8 encoding of the right single quotation mark (') — a common character in English text that's not in basic ASCII. Modern browsers display these decoded in the address bar, but the underlying URL uses the percent-encoded form. Use the decoder to see the human-readable character.
Yes — Urdu and Arabic text (Unicode) can be included in URLs through percent-encoding of their UTF-8 byte sequences. This produces long strings like %D8%A7%D9%84%D8%B3%D9%84%D8%A7%D9%85 for "السلام". Modern browsers display the decoded Urdu text in the address bar. This is fully supported for IDN (Internationalised Domain Names) and query parameters.
Double encoding occurs when an already-encoded string is encoded again — % becomes %25, turning %20 into %2520. This causes servers and parsers to receive the literal string "%20" instead of a space, breaking parameter parsing. Common cause: encoding a full URL that already contains encoded characters. Always decode first before re-encoding, or use the "decode then encode" option in this tool.
A UTM URL looks like: https://yoursite.com/page?utm_source=facebook&utm_medium=paid_social&utm_campaign=ramadan_sale_2025. Each parameter value should be URL-encoded if it contains spaces or special characters. For "Ramadan Sale 2025", encode as "Ramadan%20Sale%202025" or use hyphens instead (recommended practice: "ramadan-sale-2025" — lowercase, hyphens, no spaces). This avoids encoding issues entirely.