# Mojibake Fixer | Repair Garbled UTF-8 Text

Repair garbled text such as CafÃ© or itâ€™s: UTF-8 read as Windows-1252 or Latin-1, once or several times. See what changed and what was lost.

Canonical: https://tamperbox.dev/mojibake-fixer

Docs: https://docs.tamperbox.dev/tools/mojibake-fixer.md

Updated: 2026-10-26

Reviewed: 2026-10-26

## How it works

Mojibake is text written in UTF-8 and read as Windows-1252 or Latin-1, so each accented letter turns into two or three wrong characters: "é" becomes "Ã©" and an apostrophe becomes "â€™". The fixer finds runs of characters that Windows-1252 can produce, turns them back into the bytes they came from, and keeps the result only when those bytes are valid UTF-8. Text that was damaged twice is repaired again, up to three times. The first 50 repaired runs are listed with what they became, while the count covers all transformations. Runs that do not decode cleanly stay unchanged.

The full method, every rule and worked examples are on [docs.tamperbox.dev](https://docs.tamperbox.dev/tools/mojibake-fixer/).

## Limits and interpretation

Only UTF-8 read as Windows-1252 or Latin-1 is repaired. Text damaged through other encodings, such as Cyrillic or Japanese code pages, is not detected. A replacement character (U+FFFD) means a program already threw the original bytes away, so that part cannot be repaired; get the text again from its source. A repair is kept only when it decodes cleanly, so a genuine "Ã" in Portuguese is left alone. Input is limited to 200,000 characters and files to 512 KiB. Nothing is stored.

## Frequently asked questions

### Why does my text show Ã© instead of é?

The text was saved as UTF-8, where é is two bytes, and opened by a program that read each byte as one Windows-1252 character. Common causes are a CSV opened in a spreadsheet without choosing UTF-8, a database connection with the wrong character set, and an email or web page without a charset.

### Why are some characters shown as � and not repaired?

The � is the replacement character. A program that could not read some bytes replaced them with it, and the original letters are gone. Export the text again from its source, read as UTF-8.

### How do I stop it happening again?

Declare UTF-8 everywhere the text passes: the file or export, the database connection, the HTTP Content-Type header and the HTML meta charset. When opening CSV in a spreadsheet, import it and choose UTF-8 rather than double-clicking it.

## References

[RFC 3629: UTF-8](https://www.rfc-editor.org/rfc/rfc3629) · [WHATWG Encoding Standard: windows-1252](https://encoding.spec.whatwg.org/#windows-1252) · [W3C: Character encodings for beginners](https://www.w3.org/International/questions/qa-what-is-encoding) · [Unicode FAQ: UTF-8, UTF-16, UTF-32 and BOM](https://www.unicode.org/faq/utf_bom.html).
