URL Encoder / Decoder
Percent-encode text for safe URL use, or decode URL-encoded strings
Real-Life Guide to Using the URL Encode/Decode
Percent-encode URL components
When this calculator is useful
Use this when building a query string with special characters, sharing a link that contains spaces or non-English text, or debugging why a URL parameter is being cut off or misread by a server.
Common Mistakes
- Encoding an entire URL including the protocol and domain (e.g. turning https:// into https%3A%2F%2F), which breaks the link — only individual parameter values should typically be percent-encoded.
- Forgetting that a space in a query string should become %20 (or + in form-encoded data), not left as a literal space, which many servers will truncate the URL at.
- Double-encoding a string that is already percent-encoded, turning %20 into %2520, which then displays as a literal "%20" instead of a space when decoded once.
- Not encoding reserved characters like &, =, or # inside a parameter value, which get misinterpreted as separating a new parameter or a URL fragment instead of being part of the data.
- Assuming URL encoding and Base64 encoding are interchangeable — they solve different problems and produce different, non-compatible output for the same input.
How to Interpret Results
Encoding replaces unsafe or reserved characters with % followed by their hex byte value so the string can travel safely inside a URL; decoding reverses %XX sequences back to the original characters — check that decoded output matches your original text exactly, especially around spaces and symbols.
URL Encode/Decode FAQs
What is URL Encoding?
URLs can only contain certain ASCII characters. Special characters (spaces, punctuation, non-ASCII) must be percent-encoded — replaced with % followed by two hex digits representing the character's UTF-8 byte value. For example, a space becomes %20, and © becomes %C2%A9.
This tool uses JavaScript's encodeURIComponent(), which encodes everything except letters, digits, and -_.!~*'(). Use this when encoding a query parameter value. If you need to encode a full URL (preserving /, ?, #), use encodeURI() instead.