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
The short answer
URL encoding, also called percent encoding, replaces each unsafe byte with % and two hex digits of its UTF-8 value, so a space becomes %20 and é becomes %C3%A9. Use component mode for a single value such as a query parameter, and whole URL mode to keep separators like / and ? in place.
FormulaEach unsafe byte becomes % followed by its two hex digits, for example space = %20 and & = %26
Worked exampleIn component mode, Tea & coffee: 50% off at Café Rosa becomes Tea%20%26%20coffee%3A%2050%25%20off%20at%20Caf%C3%A9%20Rosa.
Example
Tea & coffee: 50% off at Café Rosa
Tea%20%26%20coffee%3A%2050%25%20off%20at%20Caf%C3%A9%20Rosa
How to use the url encoder
- Paste your text into the Text or URL box.
- Choose Encode as: Component, Form value or Whole URL.
- The encoded result updates as you type. Press Run any time to refresh it.
- Use Copy result or Download to save it.
How it works
Component encodes everything except letters, digits and - _ . ! ~ * ' ( ), so characters like &, =, / and ? become percent codes.
Form value 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. If you use Copy link, what you entered is placed in the link.
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 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. Component uses the browser's encodeURIComponent, and Whole URL uses encodeURI. The work happens in your browser.
Last updated November 1, 2026. Maintained by SnowRock. How our tools work
All 220 SnowRock tools