Mojibake Decoder: Fix Garbled Japanese Text

Mojibake Decoder: Fix Garbled Japanese Text

Mojibake (文字化け) is what you see when text saved in one character encoding is opened in another. Paste the garbled text and the decoder tries the classic wrong pairings — UTF-8, Shift_JIS, EUC-JP and Windows-1252 — and lists every reading, the most readable first. It also decodes URL percent-encoding and e-mail subject lines, and converts a Shift_JIS, EUC-JP or JIS text file to UTF-8. Everything runs in your browser.

What to fix
Paste it exactly as it appears. Retyping it or cutting off the end loses the bytes the decoder needs.
  • Restored text

    こんにちは

Most likely causeUTF-8 text opened as Shift_JIS
Readability after (0–100)100
Readability before (0–100)33
Readings found1

The first reading is the most likely one. Check names and numbers before you rely on it.

Calculated on your device · formulas checked against known results · How we test

How to use the decoder

  1. 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.
  2. 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.
  3. 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.
  4. 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 seeWhat happened
縺薙s縺ォ縺。縺ッ — many 縺, 繧, 繝 and half-width katakanaUTF-8 text opened as Shift_JIS
ã“ã‚“ã«ã¡ã¯ — ã, â, à and symbolsUTF-8 text opened as Windows-1252 or Latin-1
‚±‚ñ‚É‚¿‚Í — ‚, ƒ and accented capitalsShift_JIS text opened as Windows-1252
¤³¤ó¤Ë¤Á¤Ï — ¤ and ¥ before every characterEUC-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 digitsURL 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 ASCIIISO-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:

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.

Embed this calculator on your website

Free for any website or blog. Paste this code where you want the calculator to appear:

All free calculator widgets

Last updated: November 14, 2026

Menu

Categories

Finance Calculators34 calculatorsBusiness & Shopping Calculators10 calculatorsHealth & Fitness Calculators16 calculatorsMath & School Calculators38 calculatorsDate & Time Calculators25 calculatorsHoliday Countdowns17 calculatorsEveryday Tools64 calculatorsMic, Camera & Sound Tools13 calculatorsDeveloper Tools14 calculatorsImage & PDF Tools32 calculatorsEngineering Calculators43 calculators

CalcWorthy

AboutContactPrivacy PolicyTerms of Use

Language

Language
EnglishEnglishالعربيةArabicবাংলাBanglaDeutschGermanEspañolSpanishفارسیPersianFrançaisFrenchעבריתHebrewहिन्दीHindiBahasa IndonesiaIndonesianItalianoItalian日本語Japanese한국어KoreanBahasa MelayuMalayNederlandsDutchPolskiPolishPortuguêsPortugueseРусскийRussianไทยThaiTürkçeTurkishУкраїнськаUkrainianاردوUrduTiếng ViệtVietnamese简体中文Simplified Chinese