URL Encoder & Decoder
Encode and decode URLs to safely use them in web applications
URL Encoding Explained
URL encoding (percent encoding) converts characters that are not allowed in URLs into a format that can be transmitted over the internet. Spaces become %20, & becomes %26, etc.
When to Use URL Encoding
- Encoding query string parameters in API requests
- Encoding form data for GET requests
- Safely including special characters in URLs
- Building URLs programmatically
encodeURI vs encodeURIComponent
encodeURIComponent encodes all special characters except: A-Z a-z 0-9 - _ . ! ~ * ' ( )
encodeURI doesn't encode characters that are valid URL parts: ; , / ? : @ & = + $ #