About URL Encoder
URLs can only carry a limited alphabet, so spaces, ampersands, slashes and non-English text have to be percent-encoded before they travel. The two browser functions people reach for behave differently: encodeURIComponent escapes a value completely, while encodeURI leaves the separators of an existing URL intact.
This encoder gives you both modes with a live preview, so you can check the exact string before pasting it into a link, form or API call. Multi-byte characters are encoded as UTF-8 bytes, which is what servers and browsers expect to receive.
What this tool does
Component and whole-URL modes
Component mode escapes a single value completely, while whole-URL mode keeps the colon, slashes, question mark and other separators.
UTF-8 percent encoding
Accented letters, Chinese, Japanese and emoji are converted to their correct UTF-8 byte sequences rather than broken Latin-1 escapes.
Live output
The encoded string updates as you type, so you can experiment with a value and see the result immediately.
Readable diagnostics
If the text contains an unpaired surrogate character that cannot be encoded, the tool explains it instead of throwing a vague URI error.
Copy and sample
Copy the encoded output in one click, or load a sample containing spaces, ampersands and non-English text.
How to use URL Encoder
- 01
Choose an encoding mode
Use component mode for one value inside a URL, or whole-URL mode when you are encoding a complete URL that still has its separators.
- 02
Paste the raw text or URL
Type or paste the unencoded content; the preview updates as soon as there is text.
- 03
Check reserved characters
Confirm that the characters which matter to your use case are encoded or preserved as expected before copying.
- 04
Copy into your request
Press Copy and paste the result into a query string, API call, redirect or HTML attribute.
Supported formats and limits
- Input
- TXT
- Output
- URL
- Processing
- Client-side, in your browser. Nothing is uploaded.
- Maximum size
- Bound by the memory available to your browser tab.
- Requirements
- Chrome, Edge, Firefox or Safari · JavaScript enabled
Limitations worth knowing
- Whole-URL mode does not guess whether a URL is already encoded, so re-encoding an existing percent-encoded URL can double-encode it.
- The encoder is not a URL validator: it does not check that a host exists or that the overall URL is well formed.
- Unpaired surrogate characters cannot be encoded and must be removed from the input.
Privacy and file handling
Encoding runs locally with the browser's built-in URI functions. The text never leaves the page, nothing is sent to a server, and no copy is stored after you close the tab.
Read the full privacy policy