How to use the decoder
- Copy the garbled text exactly as it appears, from the first broken character to the last, and paste it into the box. Do not retype it: characters that look alike are different bytes.
- Press Restore. The decoder reverses each classic mix-up and scores every result from 0 to 100 for how much it reads like real text.
- Read the first result. “Most likely cause” names the mix-up, which tells you what to change in the program that produced it. Other plausible readings are listed below with their scores.
- For a whole file, switch to A text file, drop a .txt or .csv file and download it as UTF-8. Tick the BOM option when the file is a CSV for Excel.
How garbled text happens
A file holds bytes, not letters. An encoding is the table that turns bytes into characters, and Japanese has had several: Shift_JIS (Windows, older phones and many CSV exports), EUC-JP (Unix servers), ISO-2022-JP (e-mail) and today UTF-8. When a program reads bytes with the wrong table, every Japanese character becomes two or three unrelated ones. The bytes are still intact, so reading them again with the right table brings the text back.
Take こんにちは. In UTF-8 it is fifteen bytes, starting E3 81 93. Read as Shift_JIS, E3 81 is the rare kanji 縺 and 93 E3 is 薙, so the greeting turns into 縺薙s縺ォ縺。縺ッ. The decoder does the reverse: it turns 縺薙s縺ォ縺。縺ッ back into its Shift_JIS bytes and reads those bytes as UTF-8.
Recognize the pattern
| What you see | What happened |
|---|---|
| 縺薙s縺ォ縺。縺ッ — many 縺, 繧, 繝 and half-width katakana | UTF-8 text opened as Shift_JIS |
| ã“ã‚“ã«ã¡ã¯ — ã, â, à and symbols | UTF-8 text opened as Windows-1252 or Latin-1 |
| ‚±‚ñ‚É‚¿‚Í — ‚, ƒ and accented capitals | Shift_JIS text opened as Windows-1252 |
| ¤³¤ó¤Ë¤Á¤Ï — ¤ and ¥ before every character | EUC-JP text opened as Windows-1252 |
| 、ウ、ヒ、チ、マ — half-width katakana with 、 and ・ | EUC-JP text opened as Shift_JIS |
| %E3%81%93%E3%82%93 — percent signs and hex digits | URL percent-encoding, not damage |
| =?UTF-8?B?44GT44KT?= or =?ISO-2022-JP?B?…?= | An e-mail header shown undecoded |
| $B$3$s$K$A$O(B — dollar signs and ASCII | ISO-2022-JP mail that lost its escape codes |
| ���� or ???? | The bytes were replaced: nothing to restore |
What cannot be restored
Decoding works only while the original bytes survive. Three things destroy them:
- Replacement characters. A decoder that meets a byte it cannot read writes � (U+FFFD) or a question mark and throws the byte away. Shift_JIS or EUC-JP text opened as UTF-8 comes out almost entirely as �, and no tool can undo that. Open the original file with the right encoding instead; the file option here does it.
- Half-eaten characters. UTF-8 read as Shift_JIS loses a byte whenever a pair does not exist in the Shift_JIS table. That is why 文字化け, garbled this way, shows as 譁・ュ怜喧縺・: the ・ stands for bytes that are gone, and only the middle of the word can be recovered. The decoder shows a � for each lost part instead of inventing a character.
- Invisible characters lost in copying. UTF-8 read as Windows-1252 contains control characters and non-breaking spaces. If a program strips or changes them when you copy, parts of the result come out as �. Copy from the raw source when you can.
Text saved twice in the wrong encoding (mojibake of mojibake) may need a second pass: paste the first result back in.
Convert a Shift_JIS or EUC-JP file to UTF-8
The file option reads a .txt or .csv file with the browser's own decoder and saves the same text as UTF-8. With Detect automatically the tool checks for a byte order mark, UTF-16, valid UTF-8 and ISO-2022-JP escape codes first, and then picks Shift_JIS or EUC-JP, whichever decodes the first 64 KB with fewer errors. The start of the decoded file is shown, so you can see at once whether the guess is right and choose the encoding yourself if it is not.
Excel decides the encoding of a CSV by its first bytes: without a byte order mark (BOM) it assumes the Windows code page and garbles UTF-8. Tick the BOM option to add the three bytes EF BB BF that make Excel read the file as UTF-8. For other programs, leave it off. The file is read on your device: it is not uploaded, and the page works offline once it has loaded.
URL and e-mail encodings
Percent-encoding writes each byte as % and two hex digits, so a Japanese word in a link looks like %E6%96%87%E5%AD%97. The decoder reads those bytes as UTF-8 and, when they are not valid UTF-8, as Shift_JIS and EUC-JP, which older Japanese sites still use. Our URL decoder has more options for links and query strings.
Mail headers carry non-ASCII text as MIME encoded-words: =?charset?B?…?= is Base64 and =?charset?Q?…?= is quoted-printable. When a mail program shows them raw, paste the whole subject line and the decoder joins the parts and reads them in their charset, including ISO-2022-JP.
Frequently asked questions
What is mojibake?
Mojibake (文字化け, “character transformation”) is text shown as wrong characters because it was read with a different character encoding than the one it was saved in, for example UTF-8 text opened as Shift_JIS.
Why is my CSV garbled in Excel?
Excel reads a CSV without a byte order mark in the Windows code page, so a UTF-8 file turns into mojibake. Convert the file here with the BOM option ticked, or import it in Excel with Data → From Text/CSV and choose 65001: Unicode (UTF-8).
Can text that shows only ? or � be fixed?
No. Those marks replace bytes that could not be read, and the original bytes are no longer in the text. You need the original file or message, opened with the right encoding.
Which result should I trust?
The first one has the highest readability score, but the score only measures how much the text looks like Japanese or plain ASCII. Read the result, and check names, amounts and dates against another source when they matter.
Is my text or file uploaded?
No. Decoding uses the TextDecoder built into your browser. The text and the file stay on your device, are not stored, and disappear when you reload the page.
Last updated: November 14, 2026