URL Encode — Online URL Encoder

🔒 Runs in your browser — nothing is sent to a server

URL encode any text or link into a URL-safe percent-encoded string in a single click. Paste a value below — a query parameter, form field, redirect target or path segment with spaces, `&`, `?` or non-Latin characters — and this tool converts every unsafe byte into a `%xx` escape, producing output ready to drop into a URL. Full UTF-8 is handled: diacritics, CJK characters and emoji all encode losslessly. The entire process runs 100% inside your browser; your input never leaves your device, nothing is uploaded, logged or sent to any server.

Two-pane view: input and output side by side
Copied!

When to use a URL encoder

Developers reach for a URL encoder countless times a day: assembling a search query from a user-typed phrase before calling a JSON API, building OAuth redirect URIs with signed state parameters, appending UTM campaign values with spaces and punctuation to marketing links, encoding filenames for a `Content-Disposition` header, or safely putting a JWT or session token into a URL fragment. Running the encode in a trustworthy, offline-first page is the fastest and safest way to produce a value you are about to paste into production code — no copy-pasting through a remote service that might log your tokens.

How percent encoding works

Percent encoding works at the byte level. A URL encoder first converts the input string to its UTF-8 byte sequence — for plain ASCII this is identity, for accented letters it expands to 2 bytes, for most CJK characters 3 bytes, and for emoji up to 4 bytes. It then walks the byte stream: unreserved characters (`A–Z`, `a–z`, `0–9`, `-`, `_`, `.`, `~`) are kept as-is, and every other byte is emitted as `%` followed by two uppercase hexadecimal digits. This page performs the full walk in the browser by delegating to the native `encodeURIComponent` implementation, so no network call is needed and no byte ever leaves your device.

Examples

Input
hello world
Output
hello%20world
URL encode classic — space to `%20`
Input
https://example.com/search?q=free converter&lang=en
Output
https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dfree%20converter%26lang%3Den
Encode URL online — full query string
Input
a&b=c+d
Output
a%26b%3Dc%2Bd
URL encode special characters — ampersand, equals, plus
Input
Zürich
Output
Z%C3%BCrich
URL encoder with diacritics — Swiss city name

FAQ

How do I URL encode a string?

Paste the string into the input box above — this tool runs `encodeURIComponent` on it and shows the percent-encoded result in the output pane. No button press, no upload. Programmatically, call `encodeURIComponent(str)` in JavaScript, `urllib.parse.quote(str, safe="")` in Python, or `java.net.URLEncoder.encode(str, "UTF-8")` in Java.

What is URL encoding (percent encoding)?

URL encoding, also known as percent encoding, is the rule defined by RFC 3986 for making any byte safe inside a URL. Every byte that is not an unreserved ASCII character is replaced by `%` followed by two hexadecimal digits. Percent encoding is needed anywhere a URL, query string, form body or path segment carries spaces, `&`, `?`, diacritics or emoji.

What is the difference between `encodeURIComponent` and `encodeURI`?

`encodeURIComponent` escapes every reserved URL character, including `/`, `?`, `&`, `=` and `#`, so the result is safe to drop into a single query parameter or path segment. `encodeURI` is lenient — it leaves reserved characters alone so the URL structure remains intact. For encoding a value you are placing into a query parameter, form body or path piece, always reach for `encodeURIComponent`. This page uses `encodeURIComponent` under the hood.

How do I URL encode special characters like `&`, `=` and `+`?

`encodeURIComponent` converts `&` to `%26`, `=` to `%3D` and `+` to `%2B`. That matters when those characters appear inside a value — leaving them raw would corrupt the surrounding query string. Paste the raw value here and the URL encoder will escape every reserved character in one pass, so the encoded result can be safely concatenated into a URL.

Does this URL encoder handle diacritics, CJK and emoji?

Yes. The encoder first converts the input to UTF-8 bytes, then replaces each non-ASCII byte with its `%xx` escape — the same path every modern server expects. That is the right flow for German umlauts, Chinese/Japanese/Korean characters, Arabic, Hebrew and emoji. Pasting `Zürich` returns `Z%C3%BCrich`, and longer non-Latin strings behave identically.

Is my data safe when I encode URL online here?

Yes. This URL encoder runs entirely in your browser using the native `encodeURIComponent` function. Your input and the percent-encoded result stay on your machine — nothing is uploaded, no server-side logging happens, and there is no account or history. Safe for tokens, session IDs, signed redirect URLs and other confidential strings.

Glossary

Percent encoding

Percent encoding is the URL-safe transport format defined by RFC 3986. Any byte that cannot appear literally in a URL — reserved characters, control codes, non-ASCII text — is replaced by `%` followed by two hexadecimal digits. UTF-8 multi-byte characters produce a sequence of `%xx` escapes, one per byte. A URL encoder performs exactly this substitution.

URL encoder

A URL encoder is any tool or function that applies percent encoding to a string so the result is safe to embed in a URL. It accepts raw text, converts it to UTF-8 bytes, and emits a string where unsafe bytes appear as `%xx` escapes. URL encoders live in every language's standard library and in browser APIs; this page is a URL encoder that runs fully client-side and never uploads your input.

encodeURIComponent

The built-in JavaScript function that performs full percent encoding, including reserved URL characters like `/`, `?`, `&` and `=`. `encodeURIComponent("a&b")` returns `a%26b`. Use it for any value that is going into a single URL component — a query parameter value, a path segment, a form field — so the value cannot collide with the URL's structural characters. This page's encoder is a thin wrapper around it.

URI encoder

A URI encoder is a URL encoder by another name. Since a URL is simply the most common kind of URI (Uniform Resource Identifier), the percent-encoding rules of RFC 3986 apply identically to both. In practice, most tooling uses "URL encoder" and "URI encoder" interchangeably, and this page works for any URI component you need to make transport-safe.

Escape URL

"Escape URL" is informal shorthand for percent-encoding a string. It traces back to the deprecated JavaScript global `escape`, which predates `encodeURIComponent` and does not handle UTF-8 correctly — it produces non-standard `%uXXXX` sequences for non-ASCII characters. Modern code should always use `encodeURIComponent` instead. If you landed here after searching for "escape URL", this page does the right, UTF-8-correct thing.

Related tools