Fix a text file that opens as garbage characters

A .csv or .txt that shows mojibake was saved in a different encoding than your editor expects. Re-decode it as the right charset and keep a clean UTF-8 copy.

Tools used in this guide

The job

You opened a text file — a CSV export, an old log, a subtitle — and it renders as, squares, or strings like テスト. The bytes are fine; they were written in a charset your editor guessed wrong. Re-decoding with the right one restores the text.

How to do it

Drop the file into the character encoding converter. It tries UTF-8 first and falls back to the common Japanese encodings — the preview shows which guess was used. If the preview still shows replacement characters, pick another source encoding and decode again.

  • Classic mojibake like ã‚れ means UTF-8 bytes were misread as Windows-1252 — pick UTF-8.
  • Japanese files from older Windows systems are often Shift_JIS; EUC-JP and ISO-2022-JP appear in mail and Unix-era documents.
  • UTF-16 files often open with a space between every character.

Worked example

A CSV exported from a Windows accounting app shows 譁・ク怜喧縺 instead of names. Decoding it as Shift_JIS restores 文字化け-free Japanese, and the UTF-8 download opens correctly in Excel, Numbers, and any modern editor.

Limits

Auto-detection is a heuristic for UTF-8 and Japanese encodings — a file in a legacy Cyrillic or Thai charset needs a manual pick. Browsers can only write UTF-8 text, so the download is always UTF-8; if the recipient's old system needs Shift_JIS, convert in a desktop editor. Files up to 8 MiB.