URL Encoder
Percent-encode arbitrary text for safe inclusion in URLs, or decode percent-encoded text.
Monitor this automatically
NetTests can run this check on a schedule, preserve historical results, compare changes over time, and alert you the moment something breaks.
Start monitoring free → See all monitoring productsFrequently Asked Questions
What is URL (percent) encoding?
URL encoding (percent-encoding) replaces characters that are not safe in a URL with a % followed by two hex digits. For example, a space becomes %20 and & becomes %26. This is required in query string values to avoid ambiguity with URL delimiters.
Which characters must be encoded?
Unreserved characters (A–Z, a–z, 0–9, - _ . ~) are safe and don't need encoding. Reserved characters (: / ? # [ ] @ ! $ & ' ( ) * + , ; =) have special meaning in URLs. Any character not in the unreserved set should be encoded when used as a value rather than a URL structural element.
What is the difference between encodeURIComponent and encodeURI in JavaScript?
encodeURIComponent encodes everything except unreserved characters — use it for query parameter values. encodeURI also preserves reserved characters like /, ?, and # — use it for a full URL where you want to keep the structure intact. This tool behaves like encodeURIComponent.
Why does a space sometimes become + instead of %20?
In HTML form submissions (application/x-www-form-urlencoded), spaces are encoded as + by convention. In the URL path and modern query strings, spaces should be %20. Both are valid in query strings but %20 is more portable. This tool always outputs %20.