URL Encoder / Decoder
Encode special characters for URLs or decode percent-encoded strings. 100% client-side — no data leaves your browser.
About URL Encoding (Percent Encoding)
URL encoding, also known as percent encoding, is a mechanism for encoding characters in a Uniform Resource Identifier (URI) that may have special meaning or are not allowed in certain contexts. It replaces unsafe ASCII characters with a % followed by two hexadecimal digits representing the character's byte value.
When Do You Need URL Encoding?
URL encoding is essential when building query strings, handling form data, constructing API requests, or working with internationalized URLs containing non-ASCII characters. Any character that is not an unreserved character (letters, digits, -, _, ., ~) should be percent-encoded in URI components.
encodeURIComponent vs encodeURI
encodeURIComponent() encodes all special characters including :, /, ?, #, &, and =. Use this when encoding individual query parameter values or path segments.
encodeURI() encodes a full URI but preserves characters that have special meaning in URIs such as :, /, ?, #, and &. Use this when encoding a complete URL while keeping its structure intact.
Common Percent-Encoded Characters
| Character | Encoded | Description |
|---|---|---|
| (space) | %20 | Space character |
| ! | %21 | Exclamation mark |
| # | %23 | Hash / fragment |
| $ | %24 | Dollar sign |
| & | %26 | Ampersand |
| + | %2B | Plus sign |
| = | %3D | Equals sign |
| @ | %40 | At sign |
100% Client-Side Processing
This URL encoder/decoder runs entirely in your browser using JavaScript's built-in encodeURIComponent() and encodeURI() functions. No data is transmitted to any server. Your input never leaves your device, making it safe to encode sensitive query parameters, API keys, and authentication tokens.