Free tool · CSV in · XLSX out

Keep leading zeros in Excel

A CSV holds text, so “007” survives. The moment Excel opens it, cells that look numeric are converted and the zeros disappear. This tool writes an XLSX where the columns you tick stay text, so 007 stays 007.

Paste the data instead

Columns to write as text

No file yet. Choose one and the columns that risk losing their zeros are listed here.

How it works

  1. ScanEvery column is checked for values that start with a zero, and for digit strings long enough for Excel to show as 1.23E+18.
  2. ChooseThose columns are ticked for you. Tick or untick any column to decide where Excel must keep the exact text.
  3. WriteThe XLSX stores the chosen columns as text cells, so no zero is dropped and no long number is rounded.

Questions

Why does Excel drop the leading zero?

When Excel opens a CSV it guesses a type for each cell. “007” looks like the number 7, so it stores 7 and displays 7. The text is gone. Writing the column as text in an XLSX file prevents that guess.

Why not just fix the CSV?

A CSV has no cell types: it is plain text and says nothing about formatting. The zeros are already correct in the CSV; the loss happens when a spreadsheet program interprets it. That is why the fixed file has to be an XLSX, where the cell type can be stored.

Which columns should I tick?

ZIP and postal codes, phone numbers, account and customer numbers, product codes, and any identifier of 15 digits or more. Leave amounts, counts and measurements unticked so they stay numeric and can be summed.

Can I still open the result in Google Sheets or LibreOffice?

Yes. The file is ordinary XLSX and the text formatting is part of the file, so every spreadsheet program behaves the same way.