Start Submit a site

URL Encoder and Decoder

Developer Tools

Percent-encode text for a URL or decode an encoded string back to readable text, choosing between full URLs and single query values.

Your inputs

Browse all tools

Result

Result —
  • Input characters —
  • Output characters —
  • Output bytes — B

Change any input and the result updates instantly.

Formula and rules

  • Percent-encoding writes each byte outside the allowed set as a percent sign followed by two hex digits.
  • A space becomes %20, a slash becomes %2F, and the ampersand becomes %26 — the last one matters because & separates query parameters.
  • encodeURI leaves : / ? # & = intact so the structure of a link survives, while encodeURIComponent escapes them.
  • Decoding reverses each %XX triplet back into the original UTF-8 bytes, so Chinese text returns as native characters.

Worked examples

A value inside a query string

Input a b&c with the value scope.

Result a%20b%26c — the & is escaped so it cannot be read as a second parameter.

The same text as a whole URL

Input a b&c with the whole URL scope.

Result a%20b&c — the space is still escaped but & is preserved as a separator.

Decoding Chinese text

Input %E4%BD%A0%E5%A5%BD

Result 你好 — three UTF-8 bytes become three %XX triplets, and decoding restores them.

FAQ

When do I need encodeURIComponent rather than encodeURI?

Use encodeURIComponent for any value you place after ? or &, because an unescaped & or = inside a value would split the query. Use encodeURI only on a complete link that already has its separators in place.

Why does a space sometimes become + instead of %20?

The plus sign belongs to form encoding for application/x-www-form-urlencoded bodies, where it means a space. JavaScript URL functions write %20 instead. This tool reads + as a space when decoding and always writes %20 when encoding, so the two conventions do not collide.

Why do I see %25 in my links?

%25 is an encoded percent sign, which means the text was encoded twice. Encode once at the point where the value is inserted, not again when building the final link.

What happens with an incomplete % sequence?

Decoding fails, because % must be followed by exactly two hex digits. This tool reports the problem instead of silently dropping characters.

Disclaimer: Results follow the formula shown on this page and are for reference only. Real-world quantities vary with materials, technique and conditions, so allow a margin before ordering.