URL Encoder / Decoder
Encode or decode URLs and query strings instantly
Input
Result
What is URL Encoding?
URL encoding (also called percent encoding) converts characters into a format that can be safely transmitted over the Internet. Special characters, spaces, and non-ASCII characters are replaced with a % followed by two hexadecimal digits representing the character's byte value.
For example, a space becomes %20, and the ampersand & becomes %26. This ensures URLs are valid and unambiguous.
Common URL Encodings
| Character | Encoded | Description |
|---|---|---|
| (space) | %20 | Space character |
| & | %26 | Ampersand (query separator) |
| = | %3D | Equals sign |
| @ | %40 | At sign |
Frequently Asked Questions
What is the difference between encodeURI and encodeURIComponent?
encodeURI() encodes a complete URI but preserves characters like : / ? # & = that have special meaning in URLs. encodeURIComponent() encodes everything, making it suitable for individual query parameter values.Why do I need to encode URLs?
URLs can only contain a limited set of ASCII characters. Special characters, spaces, and non-Latin characters must be encoded to be valid in a URL. Without encoding, the URL may break or be misinterpreted by browsers and servers.
Is %20 the same as +?
Both represent a space, but in different contexts.
%20 is used in URL path segments, while + is used in HTML form data (application/x-www-form-urlencoded). Modern best practice is to use %20 for URLs.Can I encode non-English characters?
Yes. Non-ASCII characters (Chinese, Arabic, emoji, etc.) are first encoded as UTF-8 bytes, then each byte is percent-encoded. For example, the Chinese character 浣?becomes
%E4%BD%A0.