URL Encoder
Percent-encode URLs and query strings for safe transmission
How to Use the URL Encoder
- Paste a URL or query string into the input.
- The percent-encoded output appears instantly.
- Use Component mode (encodeURIComponent) for encoding parameter values, or Full URL mode (encodeURI) to preserve URL structure and only encode unsafe characters.
What is URL encoding?
URL encoding (percent encoding) replaces unsafe ASCII characters with a % followed by two hexadecimal digits. For example, a space becomes %20, and & becomes %26.
Common uses
- Query parameters — encode values before appending to URLs
- Form submission — browsers encode form data before sending
- API requests — encode special characters in API query strings
What is URL Encoding?
URL encoding (also called percent-encoding) converts characters that are not allowed in URLs into a safe format using a % followed by two hex digits. For example, a space becomes %20, & becomes %26. This is required by RFC 3986 for any character outside the unreserved set (A–Z, a–z, 0–9, -, _, ., ~).
Common Uses
- Encoding query string parameters before appending to URLs
- Safely passing special characters like &, =, +, #, ? in URL parameters
- Encoding form data submitted via GET requests
- Building API request URLs programmatically
Frequently Asked Questions
What is the difference between URL encoding and Base64 encoding?
URL encoding makes text safe to include in URLs using % notation. Base64 encoding converts binary data to ASCII text. They serve different purposes — URL encoding is for URLs, Base64 is for data transmission.
Why does + sometimes mean a space in URLs?
In the application/x-www-form-urlencoded format (HTML forms), + represents a space. In strict RFC 3986 URL encoding, a space is %20. This is why URL-safe Base64 uses - instead of + — to avoid this ambiguity.
Should I encode the entire URL or just the parameters?
Only encode the parameter values (and keys), not the entire URL. Encoding the full URL would also encode the /, ?, and & characters that give the URL its structure.