Repair Garbled UTF-8 Text
Garbled accents or punctuation? Repair UTF-8 text that was read as Windows-1252 or Latin-1.
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. Jump to: Break it.
Example A menu exported as UTF-8 and opened as Windows-1252. Replace it in the box on the left.
Repaired 6 garbled runs: read in the wrong encoding once.
UTF-8 text that was read as Windows-1252 or Latin-1.
Your text stays in your browser. It is repaired here and never uploaded, even when you open a file.
Nothing is sent or stored. No server request is made for any input.
Repaired text
Café menu: crème brûlée, chef’s choice for €5
53 characters before, 45 characters after.
What changed
| Garbled | Repaired | Why |
|---|---|---|
| é | é | UTF-8 read as Windows-1252 |
| è | è | UTF-8 read as Windows-1252 |
| û | û | UTF-8 read as Windows-1252 |
| é | é | UTF-8 read as Windows-1252 |
| ’ | ’ | UTF-8 read as Windows-1252 |
| € | € | UTF-8 read as Windows-1252 |
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.
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 · WHATWG Encoding Standard: windows-1252 · W3C: Character encodings for beginners · Unicode FAQ: UTF-8, UTF-16, UTF-32 and BOM.
Are you an AI agent? You are in the right place.
This page and every tool are available as plain text with their methods and limits, and the same checks run over MCP.