Charset Fixer — Fix Garbled Text (Mojibake) Online Free
Fix garbled text (mojibake). Auto-detect original encoding and convert to UTF-8. Handles Shift_JIS, GBK, EUC-JP, and Latin-1 misinterpretations. 100% private.
Mojibake — garbled text caused by the wrong character encoding — is one of the most frustrating and persistent bugs in software. A CSV export from a Japanese bank opened in Excel looks like random accented European characters. A README saved on a Chinese Windows machine displays as question marks and boxes on Linux. A database dump from a legacy system produces unreadable text in every modern editor. The root cause is always the same: a sequence of bytes was written in one encoding (usually UTF-8) and read in a different encoding (usually the system’s legacy code page). The Charset Fixer detects the most likely original encoding from the byte patterns in the garbled text and reconstructs the correct UTF-8 output.
The tool works in two modes. Auto-detect scans the input for byte patterns characteristic of five common encodings — UTF-8, Shift_JIS, EUC-JP, GBK, and ISO-8859-1 — and applies the fix that matches the most confident detection. Manual pair mode gives you explicit control: select the specific encoding pair that describes your mojibake scenario. The first option, ‘UTF-8 decoded as Latin-1’, fixes the single most common case — UTF-8 text that was opened in a Western European application, where each byte of a multi-byte UTF-8 sequence becomes a separate accented Latin character. This one pair accounts for the majority of mojibake reports across the web.
The privacy model is straightforward: the TextEncoder and TextDecoder APIs run in your browser. The garbled text is read from the textarea, re-encoded to bytes with the source encoding, and decoded to UTF-8 with the target encoding. No data is sent to any server. This matters because garbled text often comes from sensitive sources — bank statements, medical records, legal documents — and sending it to a server-based converter would expose the content to a third party. The browser-local approach guarantees privacy by construction.
How to use
Paste the garbled text
Paste the text that displays as wrong characters — where accented Latin letters appear instead of Chinese, Japanese, or Korean characters. This is 'mojibake' — text that was encoded in one charset but displayed (decoded) in another.
Choose fix mode
Auto-detect scans the input for byte patterns characteristic of common encodings (UTF-8, Shift_JIS, EUC-JP, GBK, ISO-8859-1) and applies the most common fix. Manual pair lets you select a specific encoding pair — for example, 'UTF-8 decoded as Latin-1' corrects the case where UTF-8 bytes were interpreted as Windows-1252.
Copy the fixed text
If the auto-detect succeeds, the output should display the correct characters. If it doesn't, try each manual pair option one by one. The most common mojibake case — UTF-8 text opened as Latin-1 — is the first pair and fixes the majority of garbled text.
Frequently asked
What is mojibake?
Mojibake (æ–¾å–ã, literally 'character transformation') is garbled text that results from interpreting bytes in one encoding as a different encoding. The classic example: Japanese text saved as UTF-8 produces multi-byte sequences. When those bytes are interpreted as Latin-1 (one byte = one character), each byte of the multi-byte sequence becomes a separate accented character — turning '日本èª' (Nihongo) into 'æâ¥Ã¦Å¬Ã¨Âª'.
What encodings does it detect?
The auto-detect checks byte patterns for UTF-8, Shift_JIS (Japanese), EUC-JP (Japanese Unix), GBK (Simplified Chinese), and ISO-8859-1 (Western European). The manual pair mode covers common misinterpretation patterns: UTF-8 as Latin-1, Shift_JIS as Latin-1, GBK as Latin-1, EUC-JP as Latin-1, and Latin-1 to UTF-8 round-trip.
Why does this happen?
The most common scenario: a CSV file produced by a Japanese or Chinese application is saved as UTF-8 but the recipient opens it in Excel, which defaults to the system's legacy encoding (Windows-1252 on English systems, Shift_JIS on Japanese systems). Excel interprets each UTF-8 byte as a single character in the wrong encoding, producing gibberish. The fix recovers the original text by reversing this misinterpretation.
Can it fix all garbled text?
Only if the underlying bytes are intact. Some encoding conversions lose information — characters outside the target encoding's character set are replaced with `?` or dropped entirely. The tool can only recover text where every byte of the original encoding has been preserved. Data loss is permanent and cannot be recovered by any tool.
Does it work with mixed-language text?
Auto-detection uses statistical heuristics and works best with text in a single language. Mixed-language text (e.g., English commentary alongside Chinese characters) may confuse the detector. In those cases, try the manual pair options — the correct encoding for the non-English portion usually fixes the entire text.
Limitations
- No recovery from encoding lossIf characters were replaced with `?` or dropped during a previous encoding conversion, the information is permanently lost. The tool can only reverse encoding misinterpretation, not recover from truncation or substitution.
- Heuristic detectionAuto-detection uses byte-pattern heuristics that can be wrong, especially for short texts (under 50 characters) or heavily mixed-language content. Manual pair selection provides a deterministic fallback.
- No EBCDIC or exotic encoding supportThe tool handles the most common web and desktop encodings. Mainframe encodings like EBCDIC, obscure CJK variants like ISO-2022-JP, and Arabic or Indic script encodings are not supported.
Platform notes
- macOS
- macOS uses UTF-8 natively for most applications, but Terminal.app and legacy Carbon apps may still default to MacRoman. The tool handles Latin-1 misinterpretation, which is the most common macOS-to-Windows encoding mismatch.
- Windows
- Windows is the primary source of mojibake because many applications still default to the system's ANSI code page (Windows-1252 in the West, Shift_JIS in Japan, GBK in China, EUC-KR in Korea) rather than UTF-8.
- Linux
- Linux systems almost universally default to UTF-8, but files transferred from Windows systems or legacy Unix servers (which default to EUC-JP or ISO-8859-1 per locale) can produce mojibake. The `iconv` command is the CLI alternative: `iconv -f shift_jis -t utf-8 file.txt`.
- Web
- Runs entirely in the browser. No text content is sent to a server. The detector and converter use the TextEncoder/TextDecoder APIs built into the browser.