Troubleshooting

Fix CSV Excel Formatting Issues

Stop Excel from breaking your CSV data. Keep leading zeros, prevent long numbers turning into scientific notation, preserve decimal accuracy, and fix garbled accents with UTF-8 — with concrete steps and a one-click tool.

Step by stepCopy-paste codeFree converter included
Prefer not to code? Use the text to CSV converter — it runs in your browser, free, with nothing uploaded.

Open the converter

Advertisement
Overview

Why Excel changes your CSV data

Open a CSV in Excel and it immediately guesses a type for every value. That guessing is what strips the leading zero from 00123, turns a 16-digit order number into 1.23457E+17, and occasionally rounds a decimal. Separately, opening a UTF-8 file without a BOM can turn accented characters into mojibake.

None of this is your CSV’s fault — the file is fine; Excel is reinterpreting it. Below are the reliable fixes. The online converter can apply the two most important ones for you with its UTF-8 BOM and Excel-safe numbers options.

Keep leading zeros and long numbers

There are three dependable approaches:

  • Import as Text. Instead of double-clicking the CSV, use Data → From Text/CSV (or Text to Columns) and set the affected columns to Text. Excel then leaves 007 and long IDs exactly as written.
  • The formula trick. Store the value as ="007" in the CSV. Excel evaluates it to the text 007. This is what the converter’s Excel-safe numbers option writes for you.
  • Pre-format the cells. In an empty sheet, format the target columns as Text first, then paste.

Note that simply quoting a number in CSV does not stop Excel converting it — quoting protects delimiters, not data types. The Text import or the formula trick are the parts that actually work.

What the Excel-safe option writes (valid CSV)
id,code
="007",="123456789012345678"

Fix UTF-8 encoding with a BOM

If accents, Chinese, Japanese or emoji appear as garbled characters, the file is UTF-8 but Excel opened it as a legacy code page. Adding a UTF-8 BOM (byte order mark) tells Excel to read it as UTF-8.

  • In the online tool, tick UTF-8 BOM before downloading.
  • In Python, write with encoding="utf-8-sig".
  • In Excel, the modern import (Data → From Text/CSV) lets you choose 65001: Unicode (UTF-8) as the file origin.
Python — write a CSV Excel opens as UTF-8
import csv
with open("data.csv", "w", newline="", encoding="utf-8-sig") as f:
    w = csv.writer(f)
    w.writerow(["name", "city"])
    w.writerow(["José", "São Paulo"])

Preserve decimals and the right delimiter

Two more locale-related gotchas:

  • Decimal accuracy. Excel may display fewer decimals than the file contains, but the underlying value is usually intact — widen the column or increase decimal places to confirm. Importing the column as Text guarantees the exact characters are kept.
  • Comma vs semicolon. In comma-decimal locales, Excel expects semicolon-delimited files. If columns do not split, re-save or convert using the delimited text tool to match your locale.
Good to know

A quick diagnostic checklist

When a CSV looks wrong in Excel, work through the cause rather than guessing. If numbers changed (lost zeros, scientific notation, altered decimals), the fix is to import the affected columns as Text or to write them with the ="..." guard — quoting alone will not help. If characters are garbled, it is an encoding mismatch: add a UTF-8 BOM or import choosing UTF-8 as the origin. If columns did not split, the delimiter does not match your locale — try semicolon, or re-delimit the file. If everything landed in one cell, the file uses a delimiter Excel did not expect at all.

Each of these has a one-click counterpart in the converter: UTF-8 BOM for encoding, Excel-safe numbers for the numeric guard, and a choice of output delimiter to match your locale. Producing the file correctly up front is far easier than repairing it cell by cell afterwards.

FAQ

Fix CSV Excel Formatting Issues — FAQ

How do I stop Excel removing leading zeros?

Import the column as Text, or use the Excel-safe numbers option which writes the value as ="007" so Excel keeps it as text.

How do I stop long numbers becoming scientific notation?

Same fix: import as Text or use Excel-safe numbers. Quoting alone does not prevent it.

My accents are garbled — how do I fix encoding?

Add a UTF-8 BOM (the tool’s UTF-8 BOM option, or utf-8-sig in Python), or import choosing UTF-8 as the file origin.

Why does quoting not keep my numbers as text?

Quoting in CSV only protects delimiters and line breaks, not data types. Excel still type-converts quoted numbers.