URL Encoder: Encode Query Strings, Spaces & UTF-8
Turn spaces, accents and symbols into %20, %C3%A9 and %26 for links and query strings, with spaces as %20 or +. Runs locally in your browser.
Updated November 2026
Reviewed by Rafael Duarte
URL encoding replaces unsafe ASCII characters with a "%" followed by two hexadecimal digits. This is crucial for passing data in the query string.
How this URL encoder online works
Three steps, done in seconds
1. Paste the URL or text
The percent-encoded output appears under Encoded Result as you type. The counter below the input shows how many characters you pasted.
2. Pick the options
Leave Encode reserved characters checked to encode a single value (encodeURIComponent), or uncheck it to keep the URL's structure (: / ? & = and friends) intact. Check Space as + (plus) for form-style query strings.
3. Copy the result
Click Copy. Shift+Enter also copies, but only when the cursor isn't inside the text box.
What this URL encoding tool does
Two modes, one space option
Encode reserved characters
Checked by default. Uses encodeURIComponent, which encodes everything except A–Z a–z 0–9 - _ . ~ and ! ' ( ) *. Best for a single query string value.
Keep the URL structure
Uncheck Encode reserved characters to leave : / ? # [ ] @ ! $ & ' ( ) * + , ; = and % untouched while spaces, accents and other unsafe characters still get encoded. Useful for cleaning up a full URL without breaking it.
Space as +
Replaces %20 with +, the format required by application/x-www-form-urlencoded.
100% client-side
Runs on encodeURIComponent() locally. Nothing is sent to any server.
Swap & Decode
The Swap & Decode button opens the URL Decoder with the encoded result filled in, handy for checking a round trip.
Examples
When you'll need to percent encode a URL
The scenarios that come up most
Query string parameter
hello world has to become hello%20world before it goes into a URL, or it breaks on most servers.
URL nested inside a parameter
A ?redirect=https://... needs the inner URL fully encoded so it doesn't get parsed as part of the outer one.
Form submission
application/x-www-form-urlencoded requires spaces as + and special characters percent-encoded.
Links in emails and messages
A mailto: subject or a prefilled message with spaces, accents or & needs each value encoded, or the text gets cut off at the first & or #.
Something off? Start here
Encoding the entire URL
Running https://api.com/search?q=x through encodeURIComponent as one string breaks /, ? and = — encode only the parameter values, not the whole URL.
encodeURI vs encodeURIComponent
encodeURI preserves / ? #; encodeURIComponent encodes those too. Using the wrong one leaves &/= unescaped inside a parameter value, or over-escapes a full URL. This tool doesn't call encodeURI: unchecking Encode reserved characters applies its own set, which also leaves % alone.
Double encoding
With Encode reserved characters checked, a %20 already in the input becomes %2520, because the % itself is encoded to %25. Start from the raw string. With the box unchecked, % is kept as is, so existing sequences survive, but so does a lone % like "50%", which is not valid in a URL.
+ inside a path segment
The plus-for-space convention only applies inside query strings — in a URL path, + is a literal plus sign.
Why encode a URL here
Everything runs locally in JavaScript — nothing is transmitted anywhere, and you can verify that yourself in the browser's network tab.
One checkbox switches between encoding a single value and keeping a full URL's structure, which removes the recurring confusion between encodeURI and encodeURIComponent, and the space-as-+ toggle covers the form-encoding case without having to remember the rule.
Quick Tools vs. the browser console
Same function, different experience
Frequently asked questions
encodeURI preserves structural characters (/ ? # & =) and is meant for encoding a full URL. encodeURIComponent encodes those too and is meant for a single value, like one query string parameter. Neither one encodes ! ' ( ) *. More background in What Is URL Encoding?.
%20 is the standard percent-encoding for a space (RFC 3986) and is valid anywhere in a URL. + comes from the application/x-www-form-urlencoded format used by HTML forms and is only valid inside query strings.
Just the parameter values. Encoding the entire URL turns / into %2F and : into %3A, which breaks the URL's structure. When you need to clean up a complete URL (spaces or accents in it), uncheck Encode reserved characters: the structure stays intact and only unsafe characters are encoded.
Not quite. encodeURIComponent leaves ! ' ( ) * unencoded, while strict RFC 3986 encoding (required by some signing schemes) turns them into %21 %27 %28 %29 %2A. If you need that, replace those five characters by hand after copying.
%20 is valid anywhere in a URL. + is only valid inside query strings, as part of application/x-www-form-urlencoded. When in doubt, use %20.
Decode it first with the URL Decoder, then re-encode it — otherwise you double-encode the string and %20 becomes %2520.
Yes — it uses UTF-8 for every non-ASCII character. 中 becomes %E4%B8%AD, and 🚀 becomes %F0%9F%9A%80.
References
Related Tools
- URL Decoder: Turn %20, %2F & %C3%A9 Back Into Text Developer Paste a percent-encoded URL or query string and read it as plain text: %20 becomes a space, %C3%A9 becomes é, and + in a query becomes a space.
- Base64 Encoder: Encode Text, PDF & Files Online Developer Encode UTF-8 text or any file (PDF, DOCX, XLSX, ZIP up to 50 MB) to Base64 or Base64URL. Runs in your browser, nothing is uploaded. Free, no sign-up.
- HTML Entity Encoder: Escape HTML Characters Online Developer Escape <, >, &, quotes and accents as HTML entities (<, &, é) in Essential, Named or Numeric mode. Runs entirely in your browser.
- Image to Base64 Converter: Data URI, HTML & CSS Developer Drop a PNG, JPG, WebP, GIF or SVG up to 20 MB and copy raw Base64, a data URL, an <img> tag or a CSS url(). Runs in your browser, nothing uploaded.
- Base64 Decode Online — Free Base64 to Text Decoder Developer Free online Base64 decoder — decode Base64 strings back to plain text instantly in your browser. Validates input and shows decoded payload size.