URL Encode
Percent-encode URLs and query strings so special characters and spaces transmit safely.
How to use the URL Encoder
- Paste the URL, query string, or plain text you want to encode.
- Click "Encode" to percent-encode every reserved and non-ASCII character.
- Copy the encoded result for use in query parameters, API calls, or href attributes.
Why use this tool
URLs can only safely contain a limited set of ASCII characters. Spaces, ampersands, question marks, and non-Latin characters must be percent-encoded (e.g. a space becomes %20) before they can be reliably used in a query string or path segment. This tool applies the same encoding rules as JavaScript's encodeURIComponent, entirely in your browser.
Frequently Asked Questions
What is the difference between encodeURI and encodeURIComponent?
encodeURIComponent (used here) escapes more characters, including &, =, and ?, making it the safe choice for individual query string values. encodeURI is meant for encoding a complete URL and leaves those characters untouched.
Is my data sent anywhere?
No. Encoding happens locally in your browser with JavaScript — nothing is uploaded to a server.
Why does a space become %20?
Spaces are not valid in a URL, so they are percent-encoded to their hexadecimal ASCII value, 20.