Fix Garbled Text (Mojibake)
Paste text that came out of a CSV, email, subtitle file or database looking like It’s café and get It’s café back. The fixer works out which encoding mismatch produced the garbage, including text that was mangled twice, and also decodes
escapes like é and é and normalizes decomposed Unicode from macOS file names. Nothing leaves your browser.
Paste a string and the result appears here.
Other possible interpretations
Why text gets garbled
Text is stored as bytes, and the program reading it has to guess (or be told) which character encoding to use. When the writer used UTF-8 and the reader assumed Windows-1252 or Latin-1, every non-ASCII character turns into two or three odd characters. The Japanese word mojibake ("character transformation") is the usual name for this. As long as the bytes survived, the process can be reversed, which is what this tool does.
| Looks like | Cause | Typical situation | Fixable? |
|---|---|---|---|
é ü ’ — | UTF-8 bytes read as Windows-1252 / Latin-1 | Opening a UTF-8 CSV in Excel, email subjects, a database column set to latin1 | Yes |
é ’ | UTF-8 misread as Windows-1252 twice | Garbled text saved again as UTF-8, then misread again | Yes |
 stray  before symbols | Non-breaking space or © read as Latin-1 | Copied web pages, WordPress exports | Yes |
??? � | Characters replaced because the target charset could not store them | Saving to a legacy database or ASCII-only system | No, the bytes are gone |
| Accents that split in search or sort | Decomposed Unicode (NFD) from macOS file names | Files zipped on a Mac, Google Drive names | Yes (NFC normalization) |
Fixing the root cause
- Excel and CSV: save as "CSV UTF-8" or import through Data → From Text/CSV with File Origin set to 65001 (UTF-8). The Excel to CSV converter writes a UTF-8 BOM so Excel detects it.
- Databases: use
utf8mb4in MySQL and make sure the connection charset matches; in PostgreSQL the database encoding should be UTF8. A latin1 column holding UTF-8 bytes is the classic source ofé. - Web pages and APIs: send
Content-Type: text/html; charset=utf-8and<meta charset="utf-8">. Java needs-Dfile.encoding=UTF-8; Python should passencoding="utf-8"toopen(). - Email: subjects like
=?UTF-8?Q?Caf=C3=A9?=are MIME encoded words, not corruption. The universal decoder handles them automatically.
NFC and NFD normalization
Unicode can write é as one code point (U+00E9, NFC) or as e plus a combining acute accent (U+0065 U+0301, NFD). macOS stores file names in NFD, so names copied to Windows or Linux may fail to match searches, break links or display oddly even though they look identical.
Normalizing to NFC merges the pieces back into single characters. The same applies to Korean Hangul, where NFD splits syllables into separate jamo, and to Vietnamese with its stacked diacritics.
FAQ
It says the text cannot be recovered.
If characters were replaced by ? or �, the original bytes were discarded when the text was saved. The only fix is to export the source again as UTF-8.
Only part of the text was repaired.
Some bytes were probably altered while copying, for example by a text editor that normalized spaces or quotes. Copy again from the original file, or check "Other possible interpretations".
Is my text uploaded?
No. Re-decoding and normalization run in your browser; nothing is transmitted or stored.
Sources
- Character encoding decoders (Windows-1252, EUC-KR, Shift_JIS): WHATWG Encoding Standard
- Unicode normalization forms: Unicode Standard Annex #15
- UTF-8: RFC 3629; MIME encoded words: RFC 2047
Found this useful? Share it
Only the page link is shared. Your inputs and files are never included.