Skip to content

Use this result well

Inputs that matter
One URL component, such as a query parameter value.
Output to expect
The component with reserved characters and spaces percent-encoded.
How it works
The result updates as you type; spaces become %20 and a literal plus becomes %2B.
  • Apply component encoding to a path segment or parameter value, not an entire URL whose separators must remain meaningful.
  • Decode only the intended layer. The decoded text is shown for review; its contents are not evidence that a destination is trustworthy.
  • Text input is limited to 2,000,000 UTF-16 units and each result to 20,000,000. Large conversions can be cancelled or retried.

Choose your path

Built around the job you need to finish

Percent-encode one exact Unicode URI component with encodeURIComponent semantics, rejecting malformed UTF-16 and separating component encoding from complete URLs, form bodies and unrelated escaping or validation contexts.

Frontend or API developer constructing a query value

Encode one value without preserving structural delimiters or guessing the final URL context.

Split the destination into components, enter one value, inspect the percent-encoded output and save the stated context.

Can insert the encoded value at the intended component boundary without double encoding.

Security reviewer examining injection boundaries

Stop URI component encoding from being represented as HTML, SQL, shell, redirect or destination safety.

Read the context warning, review parsing/allowlisting in the receiving system and retain output only as transform evidence.

No security or destination approval is inferred from percent encoding.

International and accessibility tester

Encode multilingual text and emoji while rejecting lone UTF-16 surrogates explicitly.

Use labeled editor/output/copy/save controls and compare UTF-8 percent triplets for boundary fixtures.

Valid Unicode encodes deterministically and malformed text fails with a readable reason.

Was this tool helpful?

Reference & details

How it works

Component-only scope

The focused route treats the full input as one component value. It does not preserve complete-URL delimiters or guess whether the value belongs in a query, path, fragment, or another protocol field.

Unicode and UTF-8

Malformed lone UTF-16 surrogates are rejected. Valid Unicode is converted according to encodeURIComponent, producing UTF-8 percent triplets for characters outside its unescaped set.

Single transform boundary

The output records one percent-encoding operation. Re-encoding it can change literal percent signs, and downstream parsing, allowlisting, escaping, and authorization remain separate.

Updated: August 2026

Example Scenarios

A developer encodes `café + tea` as one value, then inserts it through the application's structured URL builder rather than concatenating a complete URL.

A reviewer proves that slash, ampersand, equals and hash are encoded as data and documents that URL structure was separated before the transform.

An internationalization tester exercises emoji, combining marks and a lone surrogate, confirming valid UTF-8 triplets and an explicit malformed-input error.

FAQ

It applies ECMAScript encodeURIComponent to one Unicode component value, such as a query value or path segment supplied as data. Structural separators should be handled by a URL builder.

Not for structure-preserving encoding. encodeURIComponent treats slash, question mark, ampersand, equals, and hash as component data. Split or construct the URL before encoding individual values.

No. application/x-www-form-urlencoded serialization has separate rules, including its treatment of spaces and plus. Use the exact serializer required by the receiving protocol.

An unpaired UTF-16 surrogate is malformed Unicode input and encodeURIComponent throws for it. The Tool reports this explicitly instead of substituting another character.

Only for the exact URI-component boundary it represents. It is not HTML, JavaScript, SQL, shell, header, redirect, scheme, host, or authorization validation.

About URL Encoder

Encode exactly one URI component after separating it from URL structure. This Tool does not encode a complete URL or form body and is not HTML, SQL, shell, redirect, or destination validation.