FormatterHQ

UTF-8 Decode

Decode UTF-8 bytes back into readable text. Paste escaped, hex, decimal or percent-encoded bytes — or mojibake such as “é” — and get the original text.

Loading tool…
Ready.

How to use the UTF-8 Decode

  1. Type or paste into the UTF-8 bytes box, or click Sample. You can also drop a text file on either box, or load one into the UTF-8 bytes box with its Open file button.
  2. The Text box updates live as you type. It works both ways — edit the Text side to convert back, or click ⇄ Swap to exchange the sides.
  3. Adjust Byte format in the options bar above the editors; the result refreshes immediately.
  4. Use Copy or Download on either box to take the result, or Clear to start again.

UTF-8 decode bytes and fix mojibake

The UTF-8 decode tool reads a sequence of bytes as UTF-8 and returns the text they represent. It accepts the byte notations you meet in real life — Python-style \xC3\xA9 escapes from logs, hex dumps, decimal byte lists, percent-encoding — and it can repair “mojibake”, the garbled text produced when UTF-8 is read with the wrong character set.

Input formats

Byte formatExample inputHow it is read
Escaped bytescaf\xC3\xA9\xHH sequences become bytes; other characters are kept as text
Hex bytes63 61 66 C3 A9Two-digit hex values, separators optional
Decimal bytes99 97 102 195 169Numbers from 0 to 255
Percentcaf%C3%A9%HH sequences, as in URLs
Latin-1 viewcaféEach character is taken as one byte

Pick the Byte format that matches your input; the same setting controls the output when you type on the Text side, so you can switch directions freely.

Example

Input:

Gr\xC3\xBC\xC3\x9Fe aus K\xC3\xB6ln \xE2\x80\x94 \xE6\x9D\xB1\xE4\xBA\xAC

Output:

Grüße aus Köln — 東京

Repairing mojibake

When UTF-8 text is decoded as Latin-1, each byte becomes its own character, so “café” turns into “café”. Paste the garbled text with the Latin-1 view byte format and the tool re-reads those characters as bytes, restoring the original:

Garbled:

café crème

Repaired:

café crème

This works for true Latin-1 mojibake. Text that went through Windows-1252 contains characters such as “Ÿ”, “€” or “™” for bytes 0x80–0x9F; these are not turned back into bytes, so sequences containing them are not repaired. Invalid sequences show up as the replacement character �, pointing you to the damaged spots (in the Percent format they stay as %XX instead).

A leading byte order mark (EF BB BF) is dropped during decoding, as UTF-8 decoders normally do, so it will not appear as an invisible character at the start of your output. The Percent format is the exception: %EF%BB%BF is decoded and kept.

Common mojibake patterns

The same few garbled sequences account for most broken text. Each one is the UTF-8 form of a character read as Windows-1252:

You seeIntendedUTF-8 bytes
’’E2 80 99
““E2 80 9C
——E2 80 94
ü / öü / öC3 BC / C3 B6

The Latin-1 view repairs only the last row. The first three contain Windows-1252-only characters (€, ™, œ, ”), which this tool does not turn back into bytes: ’ comes out as �€™. If you see é instead of é, the text was mis-decoded twice and contains such a character too, so it is not repaired here either; the Python library ftfy is designed for these cases.

Where these bytes come from

  • Python bytes printed with repr(), such as b'caf\xc3\xa9'.
  • Database and log tools that show non-ASCII bytes escaped.
  • Hex dumps from xxd, Wireshark or a hex editor; for plain hex also see Hex to UTF-8.
  • CSV files opened in Excel with the wrong encoding.

To go the other way, use UTF-8 Encode. Decoding runs in your browser.

Frequently asked questions

How do I fix “é” and “’” in my text?
Choose the Latin-1 view byte format and paste the garbled text; the Text box shows the repaired text: “é” becomes “é”. Sequences with Windows-1252-only characters, such as “’”, are not repaired, because € and ™ are not turned back into bytes.
What does the � character in the output mean?
It is the Unicode replacement character, shown where the bytes are not valid UTF-8 — for example a truncated multi-byte sequence.
Why does my hex input come out unchanged?
The byte format is probably still set to Escaped bytes, which only converts \xHH sequences. Select “Hex bytes” so the digits are read as byte values.
Can I decode UTF-16 bytes?
No, this tool decodes UTF-8 only. UTF-16 data has a different byte layout and would produce wrong characters.

Last updated October 3, 2026

Related tools