Mojibake Repair: Decide Whether It Is Recoverable

Open Tool Mojibake Repair

Mojibake is bytes decoded with the wrong encoding

Files store bytes, and an encoding decides how those bytes become characters. The same bytes read as UTF-8 and as GBK give entirely different text, and the wrong reading is mojibake. Repair works backwards: decode the garbled text under the encoding that misread it to recover bytes, then decode those bytes correctly. This runs both ways, so besides attempting a fix the tool offers a reproduce mode and a byte view to confirm which step went wrong.

Steps

  1. Paste the garbled text and keep the original.
  2. Try the repair mode and see whether the result reads.
  3. If it still fails, reproduce the corruption to locate the layer where misreading happened.
  4. Inspect the UTF-8 byte view as a hex sequence when you need evidence.
  5. Copy back into the file and reopen it to verify.
  6. Reset for the next sample.

Reversible and not

Recovery depends on whether information survived. If a whole byte string was decoded under the wrong encoding, the characters are intact and reversing restores them. But when decoding already substituted replacement characters, the original bytes are gone, and those boxes and question marks mark exactly the losses, which no repair recovers; re-export from the source instead. Mixed encodings are worse, with UTF-8 and GBK in one file, where a single pass fixes only one side. Declarations also disagree with reality, and a correct file with a wrong header declaration or a wrong server response header still displays garbled.

Common mistakes

Repeatedly repairing text that already lost data, making it worse. Running the wrong direction on healthy UTF-8 and damaging it. Skipping the backup so nothing can be undone. Treating mixed-encoding files in one pass and fixing half. Editing content without the encoding declaration. And blaming files for what is actually a misconfigured response header.

Where repair cannot go

Text with lost information is not repairable; re-export from source. Database and API issues need connection encoding, table encoding and headers checked together, since text alone changes nothing. Batch repairs start with sampling, and mixed-origin sources get separated. Legal and financial text gets item-by-item verification after repair. And overwriting the original archive destroys the audit trail.

⏫︎