Productivity and Utilities

Fix Garbled Text (Mojibake)

Turn garbled characters like é back into the text they were meant to be.

Paste text that shows strange sequences such as é, ’ or ü.

Repair works when the original text was UTF-8 but was shown as Windows-1252 or Latin-1. If the garbled text already contains the replacement character (a diamond with a question mark), the original bytes are gone and cannot be recovered. Everything runs in your browser and nothing is uploaded.

Next step

How to use the fix garbled text (mojibake)

  1. Choose Fix garbled text and paste text that shows strange sequences such as é, ’ or ü where accented letters or punctuation should be.
  2. Read the repaired text and the summary line, which says how many sequences were fixed and whether Windows-1252 or Latin-1 was assumed.
  3. To look at the bytes behind a text, choose Text to bytes, pick an encoding and read the hexadecimal. Choose Bytes to text to go the other way from hex such as C3 A9.
  4. Use Copy result to take the output, or Use the result as input to continue working with it.

Worked examples

The text café is the UTF-8 bytes C3 A9 for é shown as two Windows-1252 characters, à and ©. Reading those two characters back as bytes C3 and A9 and decoding them as UTF-8 gives café. In the same way, ’ is the three bytes E2 80 99 of the curly apostrophe, and Zażółć becomes the Polish word Zażółć.

In bytes, é is C3 A9 in UTF-8, E9 in Windows-1252 and Latin-1, E9 00 in UTF-16 little-endian and 00 E9 in UTF-16 big-endian. The euro sign is E2 82 AC in UTF-8 and 80 in Windows-1252, and it does not exist in Latin-1.

How garbled text happens

Text is stored as bytes, and an encoding says which bytes mean which characters. UTF-8 writes an accented letter as two or more bytes. When a program wrongly reads those bytes as Windows-1252 or Latin-1, every byte becomes its own character and you see pairs like é instead of é. This is called mojibake. It often comes from a web page without a character set declaration, a database or file saved with the wrong setting, or text copied between systems.

The repair reverses the mistake. It finds characters that could be the first byte of a UTF-8 sequence, checks that the right number of continuation bytes follow, and decodes only those that form valid UTF-8. Text that is already correct, plain ASCII and sequences that do not form valid UTF-8 are left alone, so a mixed text keeps its good parts. Text that was damaged twice is repaired in up to three passes.

What cannot be recovered

If the garbled text contains the replacement character, a diamond with a question mark, the original bytes were already lost and no tool can bring them back. A space that replaced a no-break space after a letter such as à cannot be told apart from an ordinary space, so some sequences stay broken. Text that was converted from a different legacy encoding, such as Cyrillic or Greek code pages, needs a different repair than the one here.

Everything runs in your browser and nothing is uploaded. Input is limited to 500,000 characters. To see what a single character is made of, try the Unicode code point converter, and for percent-encoded text try the URL encoder and decoder.

Assumptions and limits

  • Repair assumes the original text was UTF-8 and was read as Windows-1252 or Latin-1. Other mixes are not handled.
  • The five bytes that Windows-1252 leaves unassigned are treated as the matching control characters, as web browsers do.
  • Latin-1 here means ISO-8859-1 with every byte from 00 to FF mapped directly to the character with the same number.
  • Bytes to text accepts hex as pairs separated by spaces, one run of digits, or values written with 0x.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

Why does my text show é instead of é?

The file or page is UTF-8, but it was displayed as Windows-1252 or Latin-1. Each byte of the two-byte letter was shown as a separate character. Pasting the text here reverses that.

Can all garbled text be fixed?

Only text damaged in this specific way. If the question mark diamond is already in the text, the original bytes are gone. Text damaged by a different encoding mix needs different handling.

What is the difference between Windows-1252 and ISO-8859-1?

They agree except for bytes 80 to 9F. Windows-1252 puts printable characters there, such as the euro sign and curly quotes, while ISO-8859-1 puts invisible control codes there.

Does the tool change my original file?

No. You paste text into the page, the repaired copy appears in a second box, and nothing is saved or uploaded. Your original stays exactly as it was.