# Mojibake Repair (Encoding Detective)

Fix garbled text (mojibake) caused by wrong-encoding decoding — reverse UTF-8/Latin-1, Windows-1252, GBK, Shift-JIS, Big5, and MacRoman chains. Auto mode tries all and picks the cleanest result.

> Canonical page: https://elysiatools.com/en/tools/mojibake-repair

- **Category:** Text Processing

- **Keywords:** mojibake, garbled text, encoding fix, utf-8 latin1, charset repair, Ã©, broken encoding

## Overview

Mojibake is the garbled text you see when bytes were encoded in one character encoding but decoded as another (e.g. UTF-8 bytes shown as Latin-1, producing Ã© instead of é). This tool reverses the wrong decode: it re-encodes the garbled string using the suspected wrong decoder, then re-decodes those bytes with the correct encoding. Auto mode tries every common chain (Latin-1, Windows-1252, GBK, Shift-JIS, Big5, MacRoman) and scores each candidate by how much clean printable text it yields, so you can paste mystery garble and let the detective find the original. Great for fixing broken CSV exports, mislabeled web pages, database import artifacts, and copy-paste between locales.

## Inputs

- **Garbled text** (textarea): Paste garbled text, e.g. cafÃ© or ä¸­æ–‡
- **Repair chain** (select)

## When to use

- Repair garbled text from broken CSV exports, web pages, or database imports.
- Restore text damaged by UTF-8, Latin-1, Windows-1252, GBK, Shift-JIS, Big5, or MacRoman mismatches.
- Identify the likely encoding chain when you are unsure how the text became corrupted.

## How it works

- Paste the garbled text into the required text field.
- Select Auto mode or choose a specific repair chain.
- The tool reverses the suspected wrong decoding and reconstructs the original text.
- Auto mode compares supported candidates and returns the cleanest printable result as HTML.

## Use cases

- Fix mojibake in exported CSV text before using it in another application.
- Restore names, punctuation, and multilingual text affected by database import encoding errors.
- Repair copied text from web pages or documents displayed with the wrong character set.

## Frequently asked questions

### What is mojibake?

Mojibake is garbled text created when bytes encoded in one character set are decoded using another.

### Can I repair "cafÃ©"?

Yes. Auto mode can reverse the UTF-8-as-Latin-1 error and recover "café".

### Which encoding chains are supported?

Supported chains include UTF-8 with Latin-1, Windows-1252, GBK, Shift-JIS, Big5, or MacRoman, plus GBK misread as UTF-8.

### What does Auto mode do?

It tries the supported repair chains and selects the candidate with the cleanest printable text.

### What input does the tool require?

Enter the garbled text in the text field. The repair chain is optional and defaults to Auto.

## Related tools

- [Chinese Character Extractor (汉字提取器)](https://elysiatools.com/en/tools/chinese-character-extractor): Extract all Chinese characters from text, filtering out punctuation and English letters, numbers, and non-Chinese symbols
- [BOM Character Remover](https://elysiatools.com/en/tools/data-bom-remover): Remove BOM (Byte Order Mark) characters from text and file content. Perfect for cleaning up text files that have encoding issues, fixing CSV imports, and preparing data for processing. Features: - Detect and remove UTF-8 BOM (EF BB BF) - Detect and remove UTF-16 BOM (FE FF or FF FE) - Detect and remove UTF-32 BOM (00 00 FE FF or FF FE 00 00) - Support multiple input formats - Visual BOM character display - Detailed detection report - Support for batch text processing Common Use Cases: - Fix CSV file import errors - Clean up text file encoding issues - Prepare data for JSON parsing - Fix XML parsing problems - Resolve API data encoding conflicts - Standardize text data format
- [Markdown to Plain Text](https://elysiatools.com/en/tools/markdown-to-plain-text): Convert Markdown formatted text to plain text by removing all Markdown syntax and formatting
- [AI RAG Chunk Quality Scorer](https://elysiatools.com/en/tools/ai-rag-chunk-quality-scorer): Score candidate RAG chunk-splitting schemes for a document across four metrics — coherence (clean sentence/paragraph boundaries), coverage (topic focus / key-term concentration), context overlap health, and chunk-size consistency — then compare up to three schemes side by side and recommend the best. Pure offline heuristics, no model calls.
- [ECharts Theme Token Extractor](https://elysiatools.com/en/tools/echarts-theme-token-extractor): Extract design tokens — colors, numbers, font sizes and strings — from an ECharts theme JSON and export them straight into your design system. Paste a theme object (the kind registered via echarts.init(dom, themeName)) and the tool walks every leaf, tagging each color (with optional named/rgb → hex normalization), spacing number, font size and string, then emits clean CSS variables, a Tailwind theme.extend config, Style Dictionary tokens.json, or SCSS variables. Bridges the gap between an ECharts visualization theme and Figma/CSS/Tailwind design tokens without copying each value by hand.
- [Emoji Extractor](https://elysiatools.com/en/tools/emoji-extractor): Extract all Unicode emoji from text, or optionally remove emojis
- [Empty Line Remover](https://elysiatools.com/en/tools/empty-line-remover): Remove all empty lines from text (lines with no content)
- [HTML Tag Stripper (HTML标签清除)](https://elysiatools.com/en/tools/new-html-tag-stripper): Remove HTML tags from code and extract clean text content

## Samples

- [Hex/Unicode Encoding Format Samples](https://elysiatools.com/en/samples/text-hex-unicode-formats): Examples of hex (\xXX) and unicode (\uXXXX) escape sequence encoding formats
- [Copyright-Free MP3 Audio Samples](https://elysiatools.com/en/samples/mp3-samples): Collection of royalty-free audio samples for testing and development purposes including nature sounds, meditation music, and ambient audio
- [Web Image Processing Python Samples](https://elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Android Image Processing Java Samples](https://elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
