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.
Four explicit contexts · UTF-8 · Browser local
Percent-encode text as a URL component, a stricter RFC 3986 component, a complete URI, or form-style data. Compare exactly which delimiters remain literal without uploading the input or requesting the result.
input café & tea
output caf%C3%A9%20%26%20tea
UTF-8 bytes become %XXContext selects what stays literal
Encode the value, not the wrong layer
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
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.
%XX byte triplets.+ and literal plus becomes %2B.One input, four intentional outputs
A–Z a–z 0–9 - _ . ! ~ * ' ( )A path segment, query key, query value, or fragment value when JavaScript encodeURIComponent() compatibility is required.A–Z a–z 0–9 - _ . ~A stricter component representation that also percent-encodes ! ' ( ) *.Trusted structural delimitersAn already assembled URI whose colon, slashes, query separators, and other syntax must remain structural.space → +A key or value serialized with application/x-www-form-urlencoded rules, as used by URLSearchParams.Choose context before conversion
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://.
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.
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
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.
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.
%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.
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
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.
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
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.
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.
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.
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.
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.
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.
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.