Encode the value, not the wrong layer

Percent-encode URL text online

Enter up to 200,000 UTF-16 code units, select the context that matches the receiving system, and copy the complete result. Conversion runs in this tab and never navigates to the encoded address.

Loading the URL encoder…

Enable JavaScript to encode and copy text. The mode comparison and standards guidance below remain readable.

UTF-8 bytes in an ASCII representation

How URL percent-encoding works

Percent-encoding represents one byte as a percent sign followed by two hexadecimal digits. ASCII space is byte 20, so general URL encoding writes it as %20. A non-ASCII character is first encoded as one or more UTF-8 bytes. The letter é, for example, becomes bytes C3 A9 and is rendered as %C3%A9 when the selected context requires encoding it.

Encoding is contextual rather than a single universal substitution table. A slash is syntax between path segments in a full URL, but it is data when it belongs inside one path segment. An ampersand separates form-style query parameters, but it may be part of a query value. Preserving a delimiter at the wrong layer can silently change the address the receiving application sees.

The interactive tool exposes four modes instead of guessing. URL component mode follows JavaScript-style component encoding. RFC 3986 component mode additionally encodes five punctuation characters that encodeURIComponent() leaves literal. Full URI mode preserves trusted URL structure. Form mode follows application/x-www-form-urlencoded, including its special space-as-plus rule.

Percent-encoding does not encrypt, hash, sanitize, validate, shorten, or make a destination trustworthy. Anyone who sees an encoded value can decode it. Apply validation and authorization after decoding on the receiving side, and never rely on an encoded path or query string to hide a credential.

Input
Unicode text, converted through UTF-8 for percent-encoding.
General output
Literal allowed characters plus %XX byte triplets.
Form output
Form serialization, where space becomes + and literal plus becomes %2B.
Limit
200,000 UTF-16 code units per operation.
Network behavior
No upload, DNS lookup, navigation, fetch, or redirect following.

One input, four intentional outputs

URL component, RFC 3986, full URI, and form modes

ModePreservesUse it for
URL componentA–Z a–z 0–9 - _ . ! ~ * ' ( )A path segment, query key, query value, or fragment value when JavaScript encodeURIComponent() compatibility is required.
RFC 3986 componentA–Z a–z 0–9 - _ . ~A stricter component representation that also percent-encodes ! ' ( ) *.
Full URITrusted structural delimitersAn already assembled URI whose colon, slashes, query separators, and other syntax must remain structural.
Formspace → +A key or value serialized with application/x-www-form-urlencoded rules, as used by URLSearchParams.

Choose context before conversion

How to encode URL data without breaking its structure

  1. 1

    Identify the layer

    Decide whether the text is one component, an already assembled URI, or a form key or value. Do not choose full URI merely because the input happens to contain https://.

  2. 2

    Encode once

    Run the conversion at the boundary where raw data enters URL syntax. Check whether a framework, router, or HTTP client will encode again before adding another encoding step.

  3. 3

    Inspect the delimiter result

    Confirm that data characters such as &, =, /, and ? are encoded when they must not alter structure, and preserved only when they are intentional syntax.

The output can be valid and still be wrong

Common URL encoding mistakes

Encoding a complete URL as one component

Component mode converts structural slashes, colons, and question marks to data. Encode individual values before assembling the URL, or choose full URI mode only for already trusted structure.

Preserving an untrusted ampersand

An ampersand left literal inside a query value can start another parameter. Use component or form encoding for keys and values rather than interpolating raw strings.

Encoding an existing percent sign again

%20 becomes %2520 when its percent sign is encoded. That may be required when an encoded string becomes data at another layer, but accidental double-encoding creates mismatches.

Mixing plus rules

A plus sign is ordinary data in most URL components but means space to form parsers. In form mode, a literal plus must be written as %2B.

Local conversion has a clear boundary

Encode copied URLs without requesting them

URLs copied from logs, OAuth callbacks, signed download links, error reports, and analytics systems can contain identifiers or credentials. This page performs the transformation in the current browser tab and does not send the entered text to a URL-encoding endpoint. It also does not navigate to the output, resolve the hostname, follow redirects, or test the remote server.

Local processing does not make sensitive input harmless. Clipboard history, browser extensions, screenshots, crash reporting, and other software on the device operate outside this page's conversion boundary. Remove secrets before sharing encoded or decoded output in a ticket, chat, public issue, or prompt.

The 200,000 UTF-16-code-unit limit is an application bound, not a statement about the maximum URL supported by browsers or servers. Real deployments usually impose much smaller limits at the browser, proxy, CDN, framework, or application layer. Validate the final URL in the exact destination environment.

Need to inspect the result?

Decode one strict round to review percent triplets, or parse an assembled URL into its WHATWG components without opening it.

Open the URL decoder →

Questions answered

URL encoder FAQ

What does a URL encoder do?

A URL encoder converts text to UTF-8 bytes and replaces bytes that are not allowed or should not be literal in the selected URL context with percent triplets such as %20 or %E3. The correct set of preserved characters depends on whether the text is a component, a complete URI, or form data.

Should I encode a URL component or a full URI?

Encode a component when inserting one value into a path segment, query key, query value, or fragment. Full URI mode preserves structural delimiters such as colon, slash, question mark, and ampersand, so it is only appropriate when those characters already form trusted URL structure.

How is RFC 3986 component mode different from encodeURIComponent?

JavaScript-style component encoding leaves exclamation mark, apostrophe, parentheses, and asterisk literal. The stricter RFC 3986 component mode percent-encodes those five characters while still leaving ASCII letters, digits, hyphen, period, underscore, and tilde literal.

Why can a space become %20 or +?

General URL percent-encoding represents a space as %20. The application/x-www-form-urlencoded format used for form-style query data serializes a space as + and encodes a literal plus sign as %2B. Select the mode required by the receiving parser.

Can I safely encode an untrusted value with full URI mode?

Not when the value must remain one component. Full URI mode preserves delimiters that can change URL structure, so an untrusted ampersand could create another query parameter and a question mark could start a query. Encode untrusted component values with component or RFC 3986 component mode.

Does this URL encoder upload or open my input?

No. Encoding runs in the current browser tab, and the tool does not send the input to an encoding API, perform DNS lookup, open the result, follow redirects, or check whether the destination exists. Clipboard tools and browser extensions remain separate privacy boundaries.

What is the URL encoder input limit?

The encoder accepts at most 200,000 UTF-16 code units in one operation. This explicit browser-side limit keeps interactive conversion and rendering bounded; split larger datasets or use a tested streaming workflow.