Developer Tools

URL Encoder & Decoder

Percent-encode text for links and query strings or decode it back, with the right mode explained.

By Nitin Raturi · Last reviewed

Input

How to use the URL Encoder & Decoder

Encode text for links and query strings, or decode %XX text back.

  1. Choose Encode or Decode.
  2. Choose whether this is one value, a whole URL or form data.
  3. Paste your text.
  4. Copy the result. For a full URL, check its parts and query parameters.

Good to know

  • If unsure, encode one value at a time: it is the safest choice.
  • Tap the ⓘ next to any field for a short guide to it.

Percent-encoding (RFC 3986) for links and query strings, using UTF-8.

Runs in your browser. Nothing you type is uploaded or saved in the link.

Direction

Encode makes text safe to put in a URL. Decode turns %XX sequences back into text.

How to fill it in

  • Choose Encode or Decode.

What you are encoding

How much is encoded depends on where the text goes.

How to fill it in

  • One value (query value or path part): also encodes & = / ? and #.
  • A whole URL: keeps the characters that give a URL its structure.
  • Form data: like one value, but a space becomes +.

Example

“name=Asha Rao&city=Pune” becomes name%3DAsha%20Rao%26city%3DPune as one value, name=Asha%20Rao&city=Pune as a URL and name%3DAsha+Rao%26city%3DPune as form data.

Text or URL

The text to encode for a URL, or the encoded text to decode.

How to fill it in

  • Paste anything. Text is encoded as UTF-8, so ₹ and Indian scripts work.
  • Paste a full URL to also see it split into its parts.

Example

₹ encodes to %E2%82%B9: three bytes in UTF-8.

Result

Encoded

name%3DAsha%20Rao%26city%3DPune

How this calculator works

  1. Step 1Text to bytesUTF-8₹ is three bytes.
  2. Step 2Keep safe charactersA–Z a–z 0–9 - _ . ~Letters, digits and a few marks pass through unchanged.
  3. Step 3Escape the rest%XXEvery other byte becomes % and two hex digits.

URLs may only contain a limited set of characters. Anything else, including spaces, ₹ and characters with a special meaning such as & and #, must be percent-encoded.

Worked example: a query value

Encoded as one value, “name=Asha Rao&city=Pune” keeps its = and & from breaking the URL.

Encoding “name=Asha Rao&city=Pune”
Rule
byte → % + two hex digits
  1. Space%20 (or + in form data)
  2. =%3D
  3. &%26
  4. As one valuename%3DAsha%20Rao%26city%3DPune
  5. As form dataname%3DAsha+Rao%26city%3DPune

As a whole URL the same text stays name=Asha%20Rao&city=Pune, because = and & are allowed to keep their meaning there.

Reading the result

  • One valueencodeURIComponentFor a query value or one path part. Encodes & = / ? # too.
  • Whole URLencodeURIFor a full address. Leaves the characters that structure a URL.

A pasted full URL is also split into parts. For example, https://example.com/search?q=chai%20latte has the query value “chai latte”.

  • UTF-8Indian scripts and emoji are encoded byte by byte.
  • + means spaceOnly in form data and query strings sent by forms.
  • Bad escapesA % without two hex digits is reported with its position.
  • Not encryptionAnyone can decode it.

Percent-encoding makes text safe in a URL. Other encodings serve other channels.

For binary data as text, use the Base64 encoder and decoder. The slug generator makes readable URL paths, and the QR code generator turns a link into a code.

Common mistakes

  • Mistake: Encoding a whole URL as one value.

    Instead: Encode each value, then build the URL around them.

  • Mistake: Encoding twice, so % becomes %25.

    Instead: Encode once, at the point where you build the URL.

  • Mistake: Treating + as a plus sign in query strings.

    Instead: Encode a real plus as %2B.

Read how we test our calculators, or browse more developer tools.

Frequently asked questions

What is the difference between encodeURI and encodeURIComponent?

encodeURIComponent encodes one value and also escapes & = / ? and #. encodeURI is for a whole address and leaves those characters alone so the URL keeps its structure.

Why do spaces sometimes become + and sometimes %20?

In form data and query strings sent by HTML forms, a space is written as +. Everywhere else in a URL it is %20. Choose “Form data” to get +.

Why is ₹ encoded as %E2%82%B9?

URLs carry bytes. In UTF-8 the rupee sign is three bytes, E2 82 B9, and each byte is written as % and two hex digits.

What does “Problem at character” mean when decoding?

A % must be followed by two hex digits, and the bytes must form valid UTF-8 text. The message points to the first place where that fails.

Is my text uploaded?

No. Encoding and decoding run in your browser. Only the mode choices are kept in the page link.

Sources and methodology

The formulas are standard time-value-of-money results. We check every figure against golden values worked out independently, by closed form and by month-by-month simulation; see the methodology.

Written and maintained by Nitin Raturi, a software engineer (about the author). Last reviewed 27 Oct 2026; next review due by . Found an error? Tell us.

Changelog

  • : Initial release. Demand metrics remain unverified.