FormatFlow

No tool matches “”

Try a format (“webp”, “mp3”) or a verb (“merge”, “compress”).

Loading index

↵to open

Developer Tools · Updated October 19, 2026

URL Encoder

You can percent-encode text for a URL or query string, choosing component or whole-URL mode, with correct UTF-8 handling for accents, Chinese and emoji.

Runs in your browserFree · No sign-up · No watermark
TXTURLRuns in your browser
Loading the tool…

Everything runs locally in this tab. No file is uploaded while the tool loads.

This tool runs in your tab. Nothing is uploaded and no copy is stored.

How files are handled

At a glance

Formats
TXT → URL
Processing
In your browser
Max size
Device memory bound
Price
Free, no account
Updated
October 19, 2026
All Developer Tools

About URL Encoder

URLs can only carry a limited alphabet, so spaces, ampersands, slashes and non-English text have to be percent-encoded before they travel. The two browser functions people reach for behave differently: encodeURIComponent escapes a value completely, while encodeURI leaves the separators of an existing URL intact.

This encoder gives you both modes with a live preview, so you can check the exact string before pasting it into a link, form or API call. Multi-byte characters are encoded as UTF-8 bytes, which is what servers and browsers expect to receive.

What this tool does

The details that matter when you use URL Encoder for real work.
  • Component and whole-URL modes

    Component mode escapes a single value completely, while whole-URL mode keeps the colon, slashes, question mark and other separators.

  • UTF-8 percent encoding

    Accented letters, Chinese, Japanese and emoji are converted to their correct UTF-8 byte sequences rather than broken Latin-1 escapes.

  • Live output

    The encoded string updates as you type, so you can experiment with a value and see the result immediately.

  • Readable diagnostics

    If the text contains an unpaired surrogate character that cannot be encoded, the tool explains it instead of throwing a vague URI error.

  • Copy and sample

    Copy the encoded output in one click, or load a sample containing spaces, ampersands and non-English text.

How to use URL Encoder

No account, no installation — the whole job happens in this browser tab.
  1. 01

    Choose an encoding mode

    Use component mode for one value inside a URL, or whole-URL mode when you are encoding a complete URL that still has its separators.

  2. 02

    Paste the raw text or URL

    Type or paste the unencoded content; the preview updates as soon as there is text.

  3. 03

    Check reserved characters

    Confirm that the characters which matter to your use case are encoded or preserved as expected before copying.

  4. 04

    Copy into your request

    Press Copy and paste the result into a query string, API call, redirect or HTML attribute.

Supported formats and limits

Input
TXT
Output
URL
Processing
Client-side, in your browser. Nothing is uploaded.
Maximum size
Bound by the memory available to your browser tab.
Requirements
Chrome, Edge, Firefox or Safari · JavaScript enabled

Limitations worth knowing

  • Whole-URL mode does not guess whether a URL is already encoded, so re-encoding an existing percent-encoded URL can double-encode it.
  • The encoder is not a URL validator: it does not check that a host exists or that the overall URL is well formed.
  • Unpaired surrogate characters cannot be encoded and must be removed from the input.

Privacy and file handling

Encoding runs locally with the browser's built-in URI functions. The text never leaves the page, nothing is sent to a server, and no copy is stored after you close the tab.

Read the full privacy policy

URL Encoder FAQ

Short, direct answers to the questions people ask before using this tool.
What is the difference between encodeURIComponent and encodeURI?
encodeURIComponent escapes reserved characters such as colon, slash, question mark and ampersand as well as spaces, so it is meant for a single value. encodeURI leaves those separators alone, so it is meant for a complete URL whose structure should survive the encoding.
Should a space be encoded as %20 or as a plus sign?
In a URL path or query string, %20 is the correct percent encoding. A plus sign means space only in application/x-www-form-urlencoded bodies, such as old HTML form submissions, so this encoder uses %20 and leaves plus handling to the URL decoder.
Why are a colon and a slash encoded in component mode?
They are reserved characters with structural meaning inside a URL. Encoding a value that contains them prevents a server or router from interpreting part of the value as a scheme, path separator or another component.
How is non-English text encoded?
Each character is converted to its UTF-8 bytes first and then written as percent escapes, so a Chinese character becomes a run of three escapes and an emoji becomes four. The receiving server decodes those bytes back into the original character.
Can I encode a full URL without destroying its query string?
Whole-URL mode preserves the separators that give a URL its structure, but it is intended for raw text that is not encoded yet. If the URL already contains percent escapes, encoding it again will double-encode them, so leave an already-encoded URL alone.
Where does the URL encoding happen?
In this browser tab. The text is passed to the browser's built-in percent-encoding functions and is never uploaded, stored or logged, which is useful when the URL contains an internal hostname or a signed token.
Why does encoding sometimes fail on pasted text?
The most common cause is an unpaired surrogate character, which is half of an emoji or a broken character left by an earlier copy operation. Remove or retype the offending character and the encoder will accept the text again.

Background reading

Format guides that explain the trade-offs behind URL Encoder.