URL Encoder / Decoder
Encode or decode URLs in real-time. Convert special characters to percent-encoded format and back.
About URL Encoding
URL encoding (also known as percent-encoding) replaces unsafe characters in URLs with a % followed by two hexadecimal digits. This is essential for passing special characters like spaces, ampersands, and non-ASCII characters in query strings and URL paths.
encodeURIComponent vs encodeURI
encodeURIComponent encodes all special characters including : / ? # [ ] @ ! $ & ' ( ) * + , ; =. Use this for encoding individual query parameters or path segments. encodeURI preserves characters that are part of URL structure, making it suitable for encoding full URLs where you want to keep the protocol, slashes, and query delimiters intact.
Common Use Cases
- Encoding query string parameters in API requests
- Passing special characters in form data
- Building deep links with dynamic content
- Decoding URLs received from external systems
This tool runs entirely in your browser. No data is sent to any server, making it safe for encoding sensitive URLs and parameters.