LightCube Data Extractor Add to Chrome ↗

Keep leading zeros when you open a CSV in Excel

Excel drops leading zeros because it converts codes like 02134 into the number 2134. The data is still in the CSV. Import with Data > From Text/CSV, click Transform Data, set the ZIP, ID or phone column type to Text, then Close and Load.

Do this in one click with LightCube Data Extractor, a free Chrome extension. No account needed.

Add to Chrome, free ↗

Step by step

  1. Data > From Text/CSV and choose the file.
  2. Click Transform Data to open Power Query.
  3. Select the column with codes, then set Data Type to Text and replace the current conversion step when asked.
  4. Close and Load.

Google Sheets

Before pasting, select the target column and set Format > Number > Plain text. Then paste or import; zeros stay.

Long numbers

IDs longer than 15 digits, such as card-like or tracking numbers, lose precision in Excel as numbers. Import them as Text for the same reason.

Do not edit and resave carelessly

If you open a CSV by double-click, Excel removes zeros in memory. Saving then writes the file without them. Keep the original export.

FAQ

Is the zero in the CSV file?
Yes, check in a text editor.
Can I add zeros back with a formula?
Yes, for fixed-length codes: =TEXT(A2,"00000").
Does Copy and paste keep zeros?
Excel still converts on paste unless the column is formatted as Text first.

Related guides

Updated 2026-11-11.

Stop retyping
tables.

Add to Chrome, free ↗

Free, no account. Web exporter Pro is $9 once.