URL Encoder: Encode Query Strings, Spaces & UTF-8

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

Shift + Enter to Copy · Shift + ← → for tabs
Input URL
0 characters
Encoding Options
Technical Insight

URL encoding replaces unsafe ASCII characters with a "%" followed by two hexadecimal digits. This is crucial for passing data in the query string.

Encoded Result
Speed
Instant
Privacy
Local Only

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

Input
Encoded output
hello world
hello%20world
hello world (Space as + checked)
hello+world
a=1&b=2
a%3D1%26b%3D2
https://site.com/search?q=hello world (reserved unchecked)
https://site.com/search?q=hello%20world
user@example.com
user%40example.com
price: €100
price%3A%20%E2%82%AC100
café
caf%C3%A9
🚀
%F0%9F%9A%80

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

Quick Tools
encodeURIComponent() in DevTools
Toggle reserved vs. component encoding
yes
two separate functions
Space as + with one click
yes
manual
Input character counter
yes
no
Nothing goes over the network
yes
yes
No need to open DevTools
yes
no

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?.

References

Related Tools