← Hashito System home 日本語 Tools Blog
Input
Result
0
Candidates found
0
Readability of the input (0-1)
0
Replacement characters left in the input
Most readable candidate
 
CandidateTrue encodingShown asBytesScoreReading

Mojibake is a misread byte sequence

Text is stored as bytes. A character encoding decides which byte stands for which character, and UTF-8, Shift_JIS, EUC-JP and ISO-2022-JP each assign them differently. When the encoding used to save the text differs from the one used to read it, the same bytes surface as different characters. That is mojibake. Nothing about the text is broken; only the reading is wrong.

If only the reading is wrong, reading it correctly brings the text back. This tool treats the visible string as the result of decoding with the wrong encoding, writes it back into bytes using that encoding, and decodes those bytes with another one. Japanese UTF-8 shown as Latin-1, such as 文字化ã‘, comes back exactly this way.

Why some strings never come back

A byte that cannot be displayed is swapped for a replacement character (? or ) on the spot. Once swapped, the original byte value is gone, so that position has lost its information. If the garbled string was then saved, no route recovers those positions. The tool counts the replacement characters in your input and still offers a partial repair of everything else.

If you still have the original file, re-reading it with the correct encoding is more reliable than repairing the garbled string. This tool is for the cases where the original is gone: the body of an email, a string left in a log, a pasted fragment.

What you seeTrue encodingEncoding used to displayRecoverable
文字化ã‘UTF-8Latin-1 / Windows-1252Yes
“ú–{ŒêShift_JISLatin-1 / Windows-1252Yes
ÆüËܸìEUC-JPLatin-1 / Windows-1252Yes
繧ィ繝ゥ繝シ逋コ逕�UTF-8Shift_JISYes, except the replaced position
????unknownunknownNo, the bytes are gone

The repair uses only the browser's built-in TextDecoder. Because TextDecoder can decode but not encode, the tool decodes every byte sequence once to build a character-to-bytes reverse table on the fly. Nothing you type is sent to a server.

Frequently asked questions

Can every mojibake be repaired?

No. If the garbled text was saved after being replaced by question marks or U+FFFD, those bytes are gone for good. The tool counts the replacement characters in your input and still offers a partial repair for the rest.

How does the repair work?

It treats the visible string as the result of decoding with the wrong encoding, writes it back into bytes using that encoding, then decodes those bytes with another one. TextDecoder can only decode, so the tool decodes every byte sequence once in your browser to build a character-to-bytes reverse table.

Several candidates appear. Which one is correct?

The score only estimates how readable the text looks; it is not a guarantee. Read from the top and pick the one that makes sense. On a tie, full repairs come before partial ones and UTF-8 comes before the other encodings.

Is my input sent anywhere?

No. The repair uses the browser's built-in TextDecoder only, and nothing you type leaves the page.