· CSV.ink Team

CSV Opens as Garbled Text in Excel: Encoding, BOM and Leading Zeros

If Chinese or accented characters turn into gibberish when you double-click a CSV in Excel, the file is usually fine — Excel guessed the wrong encoding. Here is how to tell which problem you have and how to fix each one.

You export a CSV, open it in Excel, and 品名 turns into 鍝佸悕 or café becomes café. The file is not corrupted. Excel on Windows often assumes the system ANSI code page when you double-click a .csv file, so a UTF-8 file without a BOM gets decoded as GBK, Windows-1252, or whatever your locale uses.

Three different issues get mixed up under “CSV is broken.” Only one of them is encoding.

1. Garbled characters (wrong encoding)

Symptom: letters look like random CJK or Latin garbage; column structure may still be correct.

Cause: the bytes in the file are UTF-8 (or another encoding), but Excel read them as something else.

Fix A — export UTF-8 with BOM when the file is meant for Excel

A UTF-8 BOM is the three bytes EF BB BF at the start of the file. Excel treats it as a hint that the file is UTF-8. In Python:

Python 3
with open('out.csv', 'w', newline='', encoding='utf-8-sig') as f:
    writer = csv.writer(f)
    writer.writerows(rows)

utf-8-sig writes the BOM once, then normal UTF-8 text. Most browsers and our CSV downloads use the same idea so Excel users are not stuck.

Fix B — import instead of double-clicking

If you cannot change the export:

  1. Open a blank workbook in Excel.
  2. Data → Get Data → From File → From Text/CSV.
  3. Select the file. In File Origin, choose 65001: Unicode (UTF-8).
  4. Check the preview. If Chinese or accents look right, load the table.

On older Excel builds the path is Data → From Text and the same 65001 origin setting.

2. Everything in one column (wrong delimiter)

Symptom: each row is a single cell; commas or semicolons sit inside the text.

European Excel installs often expect semicolon as the list separator. A US-style comma CSV then collapses into one column. Fix it in the same import dialog by setting the delimiter, or convert the file to the delimiter your Excel expects.

Convert CSV to Excel online (keeps UTF-8) →

3. Leading zeros disappear (Excel number conversion)

Symptom: 007 becomes 7, phone numbers lose a leading 0, long IDs turn into scientific notation. Encoding can be perfect and this still happens — Excel parses numeric-looking cells after it decodes the text.

Workarounds:

  • Import through the wizard and set that column to Text.
  • Prefix values with a single quote in the CSV ('007) — ugly but works for quick shares.
  • Keep a real .xlsx where the column is formatted as Text, instead of relying on CSV for IDs.

Quick checklist

  • Garbled letters → encoding. Prefer UTF-8 with BOM for Excel, or import as 65001.
  • One fat column → delimiter. Match comma vs semicolon to your Excel locale.
  • Zeros gone → type coercion. Force Text on import; BOM alone will not help.

If you only need a clean spreadsheet from a messy CSV, convert to .xlsx in the browser and open the workbook instead of the raw text file. That skips Excel’s CSV guessing entirely.

Excel to CSV when you need a plain-text export again →

Related tools

← All articles

More articles