apprun.icuDeveloper tool

Developer tool · Fix garbled text

Turn 日本語 back into 日本語

Mojibake happens when bytes written in one encoding are read as another. This tool tries every likely mistake, ranks the repairs by how much readable Japanese, Chinese or Korean they produce, and shows the byte-level evidence. Nothing is uploaded and nothing is stored.

Free no accountPrivate runs in your browser18 repairs tried and rankedDeep repair up to 5 passes

1 · Garbled text

paste mojibake here
Paste the text exactly as you received it. Nothing is uploaded, and your original is never overwritten.

2 · Repair options

auto by default
Forcing one encoding ignores the ranking. Use it when you know where the text came from.
Deep repairKeep applying the best repair while it improves, up to 5 passes.

3 · How text gets garbled

live demo
Typed here, read as Windows-1252 below — the mistake that produces the classic garble.
Mojibake produced

                

Best repair

auto-detected

Before — what you pasted

                  
After — repaired

                  

Byte-level view

first characters
The first characters of the repaired text with the bytes they came from
CharacterCode pointBytesMis-read as

Every candidate, ranked

Repair candidates ranked by how much readable text they produce
#CandidateReadableBrokenScoreUse

How to use Mojibake Fixer

Everything below runs in this tab. Nothing is uploaded, and no account is needed.

Step by step

  1. Paste the garbled text into Garbled text, or press Load the classic case to see the UTF-8 read as Windows-1252 mistake.
  2. Read Best repair: the detected encoding, the confidence score and the one-line explanation of what went wrong.
  3. Check Before and after and the Byte-level view. If the repair does not read like real text, it is the wrong candidate.
  4. Look through Every candidate, ranked for the runner-up, or force one encoding in the Manual override dropdown.
  5. Copy or download the repaired text, then fix the source: the file, the database column or the HTTP header that named the wrong encoding.

Details and limits

Why one garble can come from several encodings

The mojibake string is all you have, and different originals can produce similar-looking garbage. The bytes 0x93 0xFA 0x96 0x7B read as Shift_JIS give 日本, but read as GB18030 or EUC-KR they give something else that may still contain CJK characters. This tool scores every candidate by the share of the repair that is decodable CJK, kana and Hangul, against replacement characters, control codes and the Latin symbols that a wrong decode leaves behind, then shows the whole ranking so you can judge for yourself.

The Windows-1252 pitfall at 0x80 to 0x9F

In Latin-1 the byte range 0x80 to 0x9F is reserved for control characters, so a decoder that maps them to nothing destroys information. Windows-1252 fills the same range with printable characters: the euro sign, curly quotes, the en dash, the trademark sign and more. If a tool decoded those bytes as Latin-1 the characters are gone for good, which is why this tool carries the Windows-1252 round-trip table for both directions. TextDecoder can decode a label but cannot encode one, so the byte side is done here.

What double-encoded means

Text is encoded to UTF-8, a program reads those bytes as Windows-1252, and the result is saved as UTF-8 again. Every layer adds another wrong decoding on top, so the text gets longer and stranger each time: 日本語 becomes ãæ—¥æœ¬èªž. The tool tries one to five passes on its own, and the deep repair toggle keeps peeling while the text keeps improving.

The limits of guessing

A short string is ambiguous: three characters leave few candidates, and two different encodings can both produce plausible kana. The confidence score reflects that, because it grows with the amount of readable text the repair produced. When no candidate beats the original the tool says so instead of showing a confident wrong answer, and your original text is never overwritten.

Percent-encode or decode URLs and query strings · Encode or decode Base64 and check the byte length · Install for offline use

Frequently asked questions

What is mojibake?

Mojibake is text that has been decoded with the wrong character set, so the bytes are still intact but the letters are wrong. The classic case is UTF-8 Japanese read as Windows-1252, which turns 日本語 into 日本語. Because the original bytes survive inside the garbled text, the damage can usually be reversed.

How do I fix garbled Japanese, Chinese or Korean text?

Paste it into the input box. The tool converts the garbled characters back to bytes, decodes those bytes with every likely encoding, and ranks the results. The best repair appears with a confidence score and an explanation. Copy it, download it, or use the manual override if the ranking picked the wrong candidate.

Why can the same garbled text have more than one fix?

Because the tool only sees the garbled characters, not the file that produced them. Several encodings can turn the same byte sequence into text that looks plausible. The ranking shows every candidate with its score, so you can compare the runner-up against the winner and pick the one that reads like the language you expect.

What does double-encoded mean?

It means the wrong decoding happened twice. Text was encoded as UTF-8, misread as Windows-1252, then saved as UTF-8 again, so a second layer of damage sits on top of the first. Each pass adds more stray characters. Deep repair applies the best fix repeatedly while the text keeps improving, up to five passes.

My text is not Japanese, Chinese or Korean. Will this help?

Probably not, and the tool will say so. The scoring rewards readable CJK, kana and Hangul, so garbled Cyrillic, Greek or accented Latin text has nothing to gain. If nothing scores better than the original you get a plain message instead of a confident wrong answer, and your text is left untouched.

Is my text uploaded anywhere?

No. Every candidate is decoded in this tab with the browser's own TextDecoder, which ships with the browser and needs no network. There are no requests, no uploads, no cookies and no storage, and closing the tab discards everything you typed.