URL Encode / Decode
URL-encode special characters as percent-escapes (%20 etc.) or decode them back. Auto-detects direction. Useful for query parameters, redirects, and reading messy URLs.
hello world? → hello%20world%3F
URL-encode special characters as percent-escapes (%20 etc.) or decode them back. Auto-detects direction. Useful for query parameters, redirects, and reading messy URLs.
hello world? → hello%20world%3F
URL encoding (percent-encoding) replaces characters that have special meaning in URLs with % followed by their hex byte value. ? becomes %3F, space becomes %20, and so on. This is required when including arbitrary text in URL query parameters or path segments.
The tool auto-detects: if the input contains %xx sequences, it decodes; otherwise it encodes.
This tool implements percent-encoding as defined in RFC 3986. Each character is first encoded as a byte sequence using UTF‑8. Characters that are not in the unreserved set (A-Z a-z 0-9 - . _ ~) are replaced with a % followed by two uppercase hexadecimal digits representing the byte value. For example, ? (U+003F) becomes %3F, and space (U+0020) becomes %20. Non‑ASCII characters, such as é, are first converted to their multibyte UTF‑8 representation: é (U+00E9) becomes %C3%A9.
The tool auto-detects the operation direction: if the input contains a % followed by two hex digits (case‑insensitive), it assumes decoding; otherwise, it assumes encoding. During decoding, each valid %XX sequence is converted back to the corresponding byte, and the byte sequence is interpreted as UTF‑8. Invalid sequences (e.g., %GG) are passed through unchanged. This robust handling ensures both clean URLs and raw form data are processed correctly.
While many tools offer URL encoding, this one emphasizes simplicity and auto-detection.
| This tool | Online URL Encoder/Decoder (urlencoder.org) | Python urllib.parse.quote() | |
|---|---|---|---|
| Detection | Auto-detects encode vs. decode based on % patterns | No detection; manual selection | No detection; separate functions |
| Offline use | No (web-based) | No (web-based) | Yes (local script) |
| Batch handling | Single input only | Single input only | Can process lists with loops |
Percent-encoding originated with the development of the World Wide Web. RFC 1738 (1994), authored by Tim Berners‑Lee, first standardized the use of %XX escapes to include arbitrary octets in URLs. The current specification, RFC 3986 (2005), refined the rules and clarified the use of UTF‑8 for non‑ASCII characters. The automatic decode detection is a convenience feature not part of any standard but widely adopted in developer tools.
Encode user input before pasting into a URL: "hello world" → "hello%20world". Required for any query string with spaces or punctuation.
URLs in server logs are percent-encoded. Decoding makes them readable — you can see what the user actually searched for.
OAuth and SAML flows pass redirect URLs as encoded query params. Decoding shows the actual destination.
If you want to share a URL with parentheses or non-ASCII characters and need it to survive copy-paste, encode it first.
mailto: and sms: URLs need encoded subject lines and bodies. Encode the message text before assembling.
encodeURIComponent — encodes everything that's special, including ?, =, &, /. Use it when encoding a single value to put inside a URL. Use the broader encodeURI when encoding a whole URL.
In query strings (the part after ?), the legacy form-encoding standard uses + for space. Both are valid in query strings; %20 is universal everywhere else.
Yes — non-ASCII characters are encoded as their UTF-8 bytes (e.g. é → %C3%A9). This is the modern standard.
If your input contains %xx patterns, the tool assumes it's already encoded and decodes. To force re-encoding, paste cleaner input or run twice manually.