URL Encoder / Decoder
Encode or decode URLs with percent-encoding. All processing in your browser.
Tips
- Use Component mode for encoding query parameter values (encodes & and =).
- Use Full URI mode for encoding complete URLs while preserving structure.
- The URL Breakdown feature parses URLs into protocol, hostname, port, path, and query parameters.
- Non-English characters are properly handled via UTF-8 encoding.
- Press Cmd+Enter to re-encode or re-decode.
Understanding URL Encoding
URL encoding (percent-encoding) replaces unsafe characters in URLs with a percent sign followed by two hex digits. Spaces become %20, ampersands become %26. This ensures special characters do not break URL structure or get misinterpreted by servers and browsers.
JavaScript offers two encoding levels: encodeURIComponent() encodes everything except alphanumerics and a few safe characters, ideal for query parameter values. encodeURI() preserves structural characters like : / ? #, appropriate for encoding complete URLs while keeping their structure valid.
Using the wrong function is a common bug source. encodeURI() on a parameter containing & leaves it unencoded, causing it to be misread as a parameter separator. encodeURIComponent() on a full URL breaks it by encoding the protocol slashes.
Unicode characters in URLs must be UTF-8 encoded before percent-encoding. Browsers display decoded URLs for readability, but HTTP requests use the encoded form. Our tool handles this correctly for all scripts and character systems.
The URL breakdown feature parses URLs into protocol, hostname, port, path, query parameters, and hash fragment, helping you debug complex API endpoints and tracking URLs.