URL Encoder & Decoder Online

Output
Output will appear here...

URL Components Breakdown

protocolhttps:
hostexample.com
pathname/search
search?q=hello%20world&lang=it&tag=c++%20developer
hash
query params{"q":"hello world","lang":"it","tag":"c developer"}

URL Encoder & Decoder

Encode and decode URLs and their components instantly in your browser. Convert special characters, spaces, and unicode to percent-encoded format and back — essential for working with APIs, web forms, and query strings.

🔍 encodeURI vs encodeURIComponent

encodeURI preserves characters that are valid in a full URL (like :, /, ?, #), while encodeURIComponent encodes everything except letters, digits, and - _ . ! ~ * ' ( ) — making it perfect for encoding individual query string values.

Example — encoding https://example.com?redirect=https://other.com/path?foo=bar:

encodeURI — preserves URL structure
Input: https://example.com?redirect=https://other.com/path?foo=bar
Output: https://example.com?redirect=https://other.com/path?foo=bar
⚠ Nothing encoded — all characters are already valid in a URL, so the redirect value is not safe
encodeURIComponent — encodes the value
Input: https://other.com/path?foo=bar
Output: https%3A%2F%2Fother.com%2Fpath%3Ffoo%3Dbar
✓ Safe to use as a query parameter value inside another URL

🔒 Private and Offline

All encoding and decoding is performed locally in your browser. No data is ever sent to any server.