URL Encoder
Percent-encode text for safe use in URLs and query strings. Choose full-component or whole-URL mode. Runs in your browser.
Processed locally in your browser. Your text is not uploaded.
What this tool does
URLs can only contain a limited set of characters. Spaces, non-English letters, emoji and reserved characters like &, = and ? must be percent-encoded (for example a space becomes %20 and é becomes %C3%A9) before they are placed in a query string or path.
Use component mode for a single value such as a query parameter, form field or path segment: it escapes every reserved character, including / ? & = # and :. Use whole-URL mode when you already have a complete URL and only want to escape characters that are illegal in a URL, leaving the structure (https://, slashes, ?, &, #) untouched. You can also write spaces as + for application/x-www-form-urlencoded data.
Text is encoded as UTF-8 using your browser's own encodeURIComponent and encodeURI functions, locally. Nothing is uploaded.
How to use it
- 1Type or paste the text or URL into the input box.
- 2Choose “Component” for a single value, or “Whole URL” to keep the URL structure.
- 3Optionally turn on “Encode spaces as +” for form-style encoding.
- 4Copy the encoded result or download it as a text file.
Supported formats
Plain text in, percent-encoded ASCII out. Characters are encoded as UTF-8.
Privacy
This tool runs in your browser. The data you provide is processed on your device and is not sent to our servers.
Limitations
- Whole-URL mode does not understand your URL: it will not encode a & or = that is part of a value. Encode each value in component mode first, then assemble the URL.
- Text containing unpaired surrogate characters (broken emoji) cannot be encoded and is reported as an error.
- Already-encoded input is encoded again (% becomes %25). Use the decoder first if you are unsure.
- Characters such as ! ' ( ) * are left as-is by the browser functions, which is valid in URLs.
FAQ
What is the difference between component and whole-URL mode?
Component mode (encodeURIComponent) escapes everything that has special meaning in a URL, so use it for values. Whole-URL mode (encodeURI) keeps characters like : / ? & = # so a complete URL stays usable.
Should spaces be %20 or +?
In paths and most modern query handling, %20 is always correct. The + form only means “space” in form-encoded data (application/x-www-form-urlencoded), which is what HTML forms submit.
Why did my percent signs turn into %25?
The input was already encoded, so the encoder treated each % as literal text. Decode first, edit, then encode once.
Related tools
URL Decoder
Decode percent-encoded URLs and query strings back to readable text. Malformed sequences are located instead of crashing.
Base64 Encoder
Encode text to Base64 with full UTF-8 support, optional URL-safe alphabet and padding control. Runs in your browser.
JSON Formatter
Format, beautify and sort JSON with syntax highlighting. Pinpoints errors by line and column. Runs locally in your browser.
JSON Validator
Check whether JSON is valid and see the exact line and column of the first error, with a caret under the problem character.