URL encoder & decoder

Encode and decode URLs and text as you type, with %20 or + for spaces. Catch double encoding and broken % sequences, and edit the query parameters of a full URL in a table.

  • Three styles, including form data
  • Double encoding detected and fixed
  • Runs in your browser
Live In your browser
Changed
—
Non-ASCII
—
Warnings
—
  1. Input
    —
    Characters
  2. UTF-8 bytes
    —
    How the text is stored
  3. Style
    —
    Rules applied
  4. Result
    —
    Characters

URL breakdown

URL parts

Paste a full URL, starting with http:// or https://, to see its parts.

No URL found in the input.

Query parameters

Edit decoded keys and values. The URL below is rebuilt and encoded for you.

KeyValueRemove
Add parameters, or paste a URL with a query string.

What URL encoding does

URLs only allow a small set of ASCII characters, and some of them have jobs. Percent-encoding lets any text travel inside a URL safely.

% and two hex digits

Each byte that cannot appear as itself is written as % followed by its hexadecimal value: a space is %20, an ampersand %26.

UTF-8 first, then encode

Letters outside ASCII are turned into UTF-8 bytes before encoding, so é becomes %C3%A9 and an emoji becomes four %XX groups.

Reserved characters keep their job

/ ? # & = separate the parts of a URL. Inside a value they must be encoded, or the URL means something else.

Encode once, decode once

Encoding twice turns %20 into %2520. Most bugs with encoded URLs come from doing one step one time too many.

Characters you will see encoded most

What each one becomes, and why it needs encoding.

CharacterEncodedWhy
(space) %20 or + %20 in paths and most APIs, + in form data.
& %26 Separates query parameters. Encode it inside a value.
= %3D Separates a key from its value.
? %3F Starts the query string.
# %23 Starts the fragment, which browsers never send to the server.
/ %2F Separates path segments. Encode it when a path is a parameter value.
+ %2B Read as a space in form data, so a literal plus must be encoded.
% %25 The escape character itself. Encoding it twice causes %2520.
é %C3%A9 Non-ASCII letters become two or more UTF-8 bytes.
🚀 %F0%9F%9A%80 Emoji are four UTF-8 bytes.

Which encoding style to use

The three styles in the tool, and where each one belongs.

StyleSame asSpaceUse it for
URL component encodeURIComponent, plus ! ' ( ) * %20 A single query value, path segment or API parameter
Whole URL encodeURI, keeping existing %XX %20 A complete URL with spaces or non-ASCII letters, keeping : / ? # & =
Form data application/x-www-form-urlencoded + Bodies of HTML form posts and many older query strings

How to use this tool

From pasted text to a clean, correctly encoded URL.

  1. Paste or type

    Enter text, a value or a full URL, or open a .txt file. Everything stays in your browser.

  2. Pick encode or decode

    And the style: URL component, whole URL or form data. The result updates as you type.

  3. Check the warnings

    Double encoding, broken % sequences and non-ASCII characters are counted and explained.

  4. Work with the URL

    For full URLs, edit the query parameters in a table and copy the rebuilt, correctly encoded URL.

What this tool does, and what it doesn't

A plain list, so you know exactly what to expect.

This tool does

  • Encode and decode as you type
  • Offer %20, whole-URL and + styles
  • Handle UTF-8, emoji and broken bytes
  • Detect and undo double encoding
  • Split URLs and rebuild query strings
  • Open and save .txt files locally

This tool does not

  • Send your text to our server
  • Visit or check the URLs
  • Encrypt or hide anything
  • Convert Base64 or HTML entities
  • Decode old non-UTF-8 charsets
  • Shorten links

Where your data goes

Nowhere. Encoding, decoding and the URL breakdown run in your browser, and .txt files are read on your device. Nothing you type or open is sent to our server or stored. Like any website, our server keeps normal access logs of page visits, as described in our privacy policy.

Step-by-step guide by Bhavin J. Sheth.

Read the URL encoding guide

Why your results might look unexpected

The six surprises people run into most, and what each one means.

%2520 in the output

The text was already encoded. Decode it first, or use Decode fully to undo several rounds.

in the decoded text

The bytes are not valid UTF-8, often from a cut-off string or an old Latin-1 encoding.

Spaces turned into +

You decoded with the form data style. Use URL component to keep a literal +.

The URL broke after encoding

URL component encodes / ? & too. Use Whole URL for complete addresses.

%E2%80%99 instead of an apostrophe

That is a typographic ’ from a word processor, three UTF-8 bytes. It is correct.

Nothing changed

Letters, digits and - _ . ~ never need encoding, and plain text has nothing to decode.

Questions about URL encoding

What is URL encoding?

URL encoding, also called percent-encoding, replaces characters that have a special meaning in a URL, or that are not allowed in it, with a % sign and two hexadecimal digits. A space becomes %20, an ampersand becomes %26, and characters outside ASCII, such as é or emoji, are first turned into UTF-8 bytes, each written as %XX.

Should a space be %20 or +?

Both are correct in different places. In a URL path, and in most APIs, a space is %20. In form data sent by HTML forms, written as application/x-www-form-urlencoded, a space is a plus sign. Choose "Form data" to encode with + and to decode + back to spaces; choose "URL component" for %20.

What is the difference between the three encoding styles?

URL component encodes everything except letters, digits and - _ . ~, which is what you need for a single query value or path segment, like JavaScript's encodeURIComponent with !'()* also encoded. Whole URL keeps the characters that give a URL its structure, such as : / ? # & =, like encodeURI, and leaves existing %XX sequences alone. Form data matches what browsers send from forms.

What is double encoding and how do I fix it?

Double encoding happens when already encoded text is encoded again: %20 becomes %2520, because the % itself is encoded as %25. Servers decode once and are left with a literal %20. The tool warns when it sees %25 followed by two hex digits; "Decode fully" decodes repeatedly until the text stops changing.

Why does decoding show a replacement character?

A % sequence is only valid if the bytes form correct UTF-8. Text cut in the middle of a character, or encoded in an old charset such as Latin-1, produces bytes that are not valid UTF-8. The tool keeps going, shows for those bytes and counts the problem instead of failing on the whole text.

Can it encode a whole URL with query parameters?

Yes. Paste the URL and the report splits it into scheme, host, path, query parameters and fragment. Edit, add or remove parameters in the table, and the tool rebuilds the URL with each key and value encoded correctly, so an & or = inside a value cannot break the query.

Is my text sent to your server?

No. Encoding and decoding run entirely in your browser, including text from uploaded .txt files, and nothing you type or upload is sent to our server. Like any website, our server keeps normal access logs of page visits, as described in our privacy policy.