Encode special characters for URLs or decode percent-encoded strings back to readable text.
When to Use URL Encoding
URLs can only contain a limited set of ASCII characters. Special characters like spaces, ampersands, and non-ASCII text must be percent-encoded. For example, a space becomes %20 and the Japanese character ζ₯ becomes %E6%97%A5.
Characters That Must Be Encoded
| Character | Encoded | Why |
|---|
| Space | %20 or + | Not allowed in URLs |
| & | %26 | Query string delimiter |
| = | %3D | Key-value separator |
| # | %23 | Fragment identifier |
| ? | %3F | Query string start |
How to Use This URL Encoder / Decoder
Paste a URL or text to encode special characters for safe use in URLs, or paste encoded text to decode it back to readable format.
Formula & How It Works
URL encoding replaces unsafe characters with %XX (percent + hex ASCII code). Spaces become %20 (or + in query strings). Reserved chars: / ? # [ ] @ ! $ & ' ( ) * + , ; =.
Calculation Example
"hello world" β "hello%20world". "cafΓ©" β "caf%C3%A9". "a=1&b=2" β "a%3D1%26b%3D2" (when encoding the entire string, not as actual parameters).
Expert Tips
Always URL-encode user input in query parameters to prevent injection attacks. In JavaScript: encodeURIComponent() for parameters, encodeURI() for full URLs. Spaces in URLs are %20, not %2B (which is a literal +).