URL encoder
This URL encoder replaces characters that are not safe in a web address with percent codes, like %20 for a space. Developers use it when building links, query strings and API requests by hand.
- Runs in your browser
- Free, no account needed
- Copy or download the result
Result
Example
café & tea
caf%C3%A9%20%26%20tea
How to use the url encoder
- Paste your text into the Text or URL box.
- Choose an Encoding mode: One component, Form value, spaces as +, or Whole URL.
- Press Run to see the encoded result.
- Use Copy result or Download to save it.
How it works
One component encodes everything except letters, digits and - _ . ! ~ * ' ( ), so characters like &, =, / and ? become percent codes.
Form value, spaces as + works the same way but writes each space as + instead of %20.
Whole URL leaves separators such as : / ? # & = in place, so a full address keeps its structure.
Characters outside ASCII are turned into UTF-8 bytes first, so é becomes %C3%A9.
If the text holds a damaged emoji, known as an unpaired surrogate, the tool stops with an error instead of encoding it.
Everything runs in your browser. Your input is not uploaded or stored.
Questions and answers
Should I encode a whole URL or just one part?
Encode one part at a time, such as a single query value, with One component. Use Whole URL only when you have a complete address and want to keep its slashes, question mark and ampersands.
Why is a space %20 in one mode and + in another?
Both mean a space. HTML forms traditionally send + for spaces, while %20 works in any part of a URL.
Is this the same as encodeURIComponent?
Yes. One component uses the browser's encodeURIComponent, and Whole URL uses encodeURI. The work happens in your browser.