URL Encoder
Percent-encode arbitrary text for safe inclusion in URLs, or decode percent-encoded text.
URL encoding example
Every character outside the letters, the digits and - . _ ~ is replaced by % and the
two hex digits of its byte value. A character that needs several UTF-8 bytes produces several
%xx groups:
price=5 € & tax? → price%3D5%20%E2%82%AC%20%26%20tax%3F
=→%3D,&→%26,?→%3F: these separate parameters in a query string and must be encoded inside a value.- space →
%20 €→%E2%82%AC: three UTF-8 bytes, three groups.
Decoding reverses it: caf%C3%A9%20au%20lait becomes café au lait. The
hex digits may be upper or lower case; %c3%a9 and %C3%A9 decode to the same
character. Letters, digits and the four unreserved marks pass through unchanged in both
directions.
Common mistakes with percent-encoding
- Encoding a whole URL. This tool encodes every reserved character, including
:,/and?. Encode each parameter value separately and assemble the URL afterwards; an encoded complete URL is only correct as the value of another parameter (for example?redirect=https%3A%2F%2Fexample.com%2F). - Double encoding. Encoding
%20again gives%2520, because the%itself becomes%25. A URL that shows%25where a space or a slash was expected has been encoded twice. - The plus sign. HTML forms send a space as
+. The decoder here leaves+unchanged; replace it with%20first when decoding form data.
Related tools
Monitor URL Encoder automatically
Percent-encode arbitrary text for safe inclusion in URLs, or decode percent-encoded text. 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.