URL Encoder & Decoder
Encode special characters for safe URL transmission or decode percent-encoded strings back to readable text.
URL Components Parser
Query Parameters
Use Cases
- Encode query parameters for API requests
- Decode URLs from logs or analytics tools
- Handle special characters in filenames
- Build redirect URLs with parameters
- Debug URL encoding issues in web apps
Common Encodings
Encoding Methods
Encodes everything except: A-Z a-z 0-9 - _ . ! ~ * ' ( )
Preserves URL structure chars: ; / ? : @ & = + $ , #
Like encodeURIComponent but uses + for spaces
Frequently Asked Questions
What is URL encoding?
URL encoding, also called percent-encoding, converts characters that aren't allowed in URLs or have special meaning into a format that can be safely transmitted. Each unsafe character is replaced with a % followed by two hexadecimal digits representing its ASCII value. For example, a space becomes %20.
When should I use encodeURI vs encodeURIComponent?
Use encodeURI when
encoding a complete URL - it preserves characters like : / ? # that are valid URL
delimiters. Use encodeURIComponent when
encoding individual components like query parameter values, as it encodes all special
characters including URL delimiters.
Why do spaces become + or %20?
Both are valid representations of a space in URLs. The %20 encoding is the standard percent-encoding. The + symbol is used in the application/x-www-form-urlencoded format, which is what HTML forms use when submitting data. Most servers accept both, but %20 is more universally compatible.
How do I encode Unicode characters?
Unicode characters are first converted to UTF-8 bytes, then each byte is percent-encoded. For example, the emoji 🚀 becomes %F0%9F%9A%80. JavaScript's encodeURIComponent handles this automatically, making it safe to include any Unicode text in URLs.
Is my data secure?
Yes, completely. All encoding and decoding happens entirely in your browser using JavaScript. Your data never leaves your device and is not sent to any server. You can verify this by checking the Network tab in your browser's developer tools.