Text Tool

Fix Garbled Text (Mojibake): é, ’ and More

Reverse mis-decoded encodings, repair entity escapes, and recover clean text automatically.

Runs 100% in your browser. Nothing is uploaded or stored.
Candidates:
Type or paste text to generate candidates...
Drop file to load text
Garbled text
0 chars | 0 lines

Paste garbled text or drag a document file here.

Try a to see the repair engine in action.

Fixed text No garbled text detected
0 chars | 0 repaired
Common Mojibake Reference Guide (What They Mean)
Corrupted String Intended Character Character Name / Unicode Root Cause Encoding Mismatch
’ ’ Right single quotation mark (U+2019) UTF-8 bytes E2 80 99 interpreted as Windows-1252
“ / ” “ / ” Left and right double quotation marks UTF-8 bytes E2 80 9C and E2 80 9D in CP-1252
é é Latin small letter e with acute (U+00E9) UTF-8 bytes C3 A9 interpreted as Windows-1252 / ISO-8859-1
ü ü Latin small letter u with diaeresis (U+00FC) UTF-8 bytes C3 BC read as Latin-1
ñ ñ Latin small letter n with tilde (U+00F1) UTF-8 bytes C3 B1 read as Latin-1
— — Em dash (U+2014) UTF-8 bytes E2 80 94 interpreted as Windows-1252
 (invisible BOM) Byte Order Mark (U+FEFF) UTF-8 BOM bytes EF BB BF rendered literally in single-byte view
é é Double-encoded Mojibake UTF-8 was decoded as CP-1252, re-saved, and misread again

How to Fix Mojibake and Corrupted Characters

Mojibake occurs when text encoded in modern UTF-8 is opened or saved using legacy single-byte encodings like Windows-1252, ISO-8859-1, or MacRoman. Our free web utility accurately reverses the misinterpretation without altering legitimately spelled international words. Follow these steps:

  1. Paste or Drop Your Garbled Text: Copy corrupted text directly from a file, database dump, email, or terminal into the left editor pane. You can also drag and drop a .txt or .csv file directly onto the card.
  2. Automatic Real-Time Detection: The tool scans the text in real-time. Within milliseconds, it computes potential multi-pass encoding paths (Windows-1252, ISO-8859-15, CP1250, CP1251, MacRoman, CP437) and ranks the highest-probability repair.
  3. Verify the Repair Chain: Inspect the detected sequence pill (e.g. "UTF-8 was read as Windows-1252 (1 pass)") and toggle alternative matches from the Candidates strip if your content requires specific dialectical mappings.
  4. Highlight Changes: Turn on "Highlight changes" to inspect character-by-character replacements before copying your clean text or downloading an authentic UTF-8 file.

Before and After Examples

Notice how single-byte misreadings produce typical multi-character garbage sequences that our engine converts directly back into clean Unicode text:

Before (Mojibake Corrupted) The café’s menu had delicious crème brûlée.
Double corrupted: élève.
Cyrillic error: Привет, мир!
Thai: สวัสดี é
After (Repaired by MafLabs) The café’s menu had delicious crème brûlée.
Double corrupted: élève.
Cyrillic error: Привет, мир!
Thai: สวัสดี é

Explanation: What Causes Mojibake and Why Does It Happen?

The word mojibake (文字化け) comes from Japanese, literally meaning "character transformation." In the early days of computing, different operating systems and regions devised their own character sets. Western Windows machines relied on Windows-1252 (or CP-1252), older Unix machines used ISO-8859-1, DOS systems ran CP437, and Apple computers used MacRoman. Each system assigned symbols to 8-bit bytes (values from 0 to 255).

The internet standardized on UTF-8, a variable-length encoding where common ASCII characters use one byte, while accented letters, non-Latin scripts (Cyrillic, Greek, Arabic, Indic, Thai, CJK), and emojis require two, three, or four bytes.

When a legacy text editor, misconfigured MySQL database connection (such as latin1 client charset connecting to a utf8mb4 table), or email server receives a multi-byte sequence like 0xC3 0xA9 (the UTF-8 representation of é) and treats each byte independently according to Windows-1252, byte 0xC3 prints as à and byte 0xA9 prints as ©.

Understanding Limitations: When Text Cannot Be Recovered

Mathematical reconstruction is only possible when the underlying byte patterns were preserved intact. In two scenarios, data cannot be recovered:

Frequently Asked Questions

What is mojibake?
Mojibake is the garbled text that results when text is decoded using an unintended character encoding. It most commonly appears when UTF-8 text is opened as Windows-1252 or Latin-1, turning accents into sequences of à and punctuation into â€.
Why do I see ’ instead of an apostrophe?
A typographic curly right single quotation mark (’) is encoded in UTF-8 as three consecutive bytes: 0xE2 0x80 0x99. If software reads those bytes as single-byte Windows-1252, 0xE2 renders as â, 0x80 renders as €, and 0x99 renders as ™.
Can all garbled text be fixed?
If the garbled string retains the incorrect single-byte representations of the UTF-8 bytes, it can be 100% restored. However, if the text was converted to literal question marks ? or replacement characters , those specific characters have lost their byte data permanently.
Is my text uploaded or sent to a server?
No. MafLabs tools operate entirely offline within your web browser client. No text, telemetry, or file contents are ever transmitted over the network.
What is double mojibake and how does the tool fix it?
Double mojibake (like é) happens when an already corrupted string is re-saved as UTF-8 and then mistakenly read as Windows-1252 once more. Our tool offers a multi-pass reversal algorithm that recursively decodes up to 3 layers of corruption.
Will this tool damage correctly spelled words like "São Paulo"?
No. Our algorithm features a per-segment language heuristic. Isolated uppercase à characters in legitimate Portuguese or Vietnamese vocabulary are protected, and conversions are applied strictly when multi-byte grammar matches an authentic Unicode code point with an improved readability score.

Related Free Tools by MafLabs

Explore our suite of deterministic, private, client-side developer and text utilities: