URL Encoder / Decoder
Encode or decode URLs and URL components using the standard browser functions — encodeURI, decodeURI, encodeURIComponent and decodeURIComponent.
Please enter valid values.
How to use
- Paste the URL or text you want to encode or decode.
- Click the appropriate button: Encode URL for full URLs, Encode Component for query string values.
- Copy the result with one click.
Frequently asked questions
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL, leaving characters like /, ?, # and & intact (they have meaning in URLs). encodeURIComponent encodes everything except letters, digits and - _ . ! ~ * ' ( ) — use it for individual query string values.
When should I encode a URL?
Encode URLs when they contain non-ASCII characters (like Arabic or Chinese), spaces or special characters that could be misinterpreted. Browsers do this automatically for most cases, but APIs and server-side code often need explicit encoding.
What does %20 mean?
%20 is the URL-encoded form of a space character. URL encoding replaces unsafe characters with a % followed by their hexadecimal ASCII code.
Why does decoding fail sometimes?
Decoding fails if the input contains a % not followed by two valid hex digits, or if the encoded sequence is not valid UTF-8. Make sure you paste the complete encoded string.