URL Encoder

URL Encoder

Encode any URL or text to percent-encoding instantly in your browser. Follows RFC 3986. Free, no sign-up required.

Updated May 2026

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 immediately, with a live character counter.

2. Pick the options

"Encode reserved characters" (`encodeURIComponent`) or keep `/ ? &` intact; "Space as +" for form submissions.

3. Copy the result

Click Copy or press Shift+Enter to grab the encoded string.

What this URL encoding tool does

Two modes, one extra option

Encode reserved characters

encodeURIComponent mode — encodes everything except A–Z a–z 0–9 - _ . ~. Best for query string values.

Preserve reserved characters

Keeps / ? # & = untouched — for encoding a full URL without breaking its structure.

Space as +

Replaces %20 with +, the format required by application/x-www-form-urlencoded.

100% client-side

Runs on encodeURIComponent()/encodeURI() locally — nothing is sent to any server.

Examples

Input
Encoded output
hello world
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.

API request signing

AWS Signature V4 and OAuth 1.0a both require specific percent-encoding before you compute the HMAC.

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.

Double encoding

If the input already contains %20, the % itself gets encoded to %25, producing %2520. Always start from the raw, unencoded string.

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

Switching between the two modes (encode vs. preserve reserved characters) 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
Live 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.

References

Related Tools