Encode and decode URLs and query parameters.
| Character | Encoded |
|---|---|
| ␣ | %20 |
| ! | %21 |
| " | %22 |
| # | %23 |
| $ | %24 |
| % | %25 |
| & | %26 |
| ' | %27 |
| ( | %28 |
| ) | %29 |
| + | %2B |
| , | %2C |
| / | %2F |
| : | %3A |
| ; | %3B |
| = | %3D |
| ? | %3F |
| @ | %40 |
| < | %3C |
| > | %3E |
100% Private — Your Data Never Leaves Your Browser
All URL encoding and decoding is performed entirely in your browser using client-side JavaScript. No data is sent to any server, stored, or tracked.
Percent encoding (URL encoding) is defined in RFC 3986 as a mechanism to represent arbitrary data in URIs using only the limited set of US-ASCII characters allowed in URLs. Characters that are not in the unreserved set (A-Z, a-z, 0-9, -, _, ., ~) are replaced with a % sign followed by two hexadecimal digits representing the character's byte value. For example, a space (ASCII 32, hex 20) becomes %20.
JavaScript provides two encoding functions. encodeURI() preserves characters that have structural meaning in URLs (:, /, ?, #, &, =, +, @), making it suitable for encoding complete URLs. encodeURIComponent() encodes all characters except A-Z, a-z, 0-9, -, _, ., ~, making it ideal for encoding individual query parameter values. Using the wrong function is a common source of bugs — our toggle lets you switch between them easily.
RFC 3986 defines reserved characters (:, /, ?, #, [, ], @, !, $, &, ', (, ), *, +, ,, ;, =) as having special meaning in URI syntax. Unreserved characters (A-Z, a-z, 0-9, -, _, ., ~) never need encoding and can appear literally in any URI. When a reserved character appears in a non-structural context (like a ? in a query value), it must be percent-encoded.
URL encoding works on bytes, not characters. Non-ASCII characters like emojis, accented letters, and CJK text are first converted to UTF-8 byte sequences, then each byte is individually percent-encoded. For example, the é character becomes the UTF-8 bytes C3 A9, encoding to %C3%A9. This means a single non-ASCII character can produce up to 9 characters in a percent-encoded URL (for 4-byte UTF-8 sequences like emojis).
Encode parameter values when constructing API URLs to ensure special characters like spaces, ampersands, and equals signs don't break the query string structure.
Understand how browsers encode form submissions and decode URL-encoded form data received from application/x-www-form-urlencoded POST requests.
Encode URLs that contain special characters before embedding them in emails, social media posts, or other contexts where the URL might be mangled.
Decode percent-encoded URLs from browser dev tools, server logs, or API documentation to understand the actual parameter values being sent.
Encode redirect target URLs when passing them as query parameters (e.g., ?redirect=/page?a=1&b=2 must be properly encoded to avoid parsing errors).
Ensure URLs contain only safe ASCII characters for search engine crawlers. Non-ASCII characters in slugs should be percent-encoded for proper indexing.
Encode data within data URIs or custom URL schemes where special characters could be misinterpreted as delimiters.
Encode callback URLs that contain query parameters when passing them as values in other query strings or configuration fields.
Encode and decode Base64 strings and files.
Encode and decode HTML entities for safe web content.
Format, validate, and beautify JSON data instantly.
Generate random UUIDs (v4) instantly.

Founder & Developer of FreeKit
I personally designed and built every tool on this website — including the one you just used. If these tools have been helpful, I can build custom tools, automation workflows, websites, and SEO solutions tailored to your business.
Remote: Available Now
United States & European company
USD $25/hour or USD $1,500/month
On-site: Open to Relocation
With work visa & travel support