plainkit

Restore leading zeros Excel removed

Excel opened your CSV, decided 02134 was the number 2134, and saved it that way. Drop the file here, pick the columns, say how long the values should be, and get them back — plus an export Excel won't strip again. Nothing leaves your browser.

Drop a CSV here or click to choose one — or paste below.

Why Excel does this, and how to stop it

A CSV is plain text; it has no idea of "text column" or "number column". When Excel opens one, it guesses, and anything that looks like a number becomes a number — so 02134 becomes 2134, 0012 becomes 12, and a phone number becomes a very large integer. The zeros were never "in" the file after the first save.

Two ways to open a CSV without losing them:

  1. Use the Excel-safe download above. It wraps the fixed values as ="02134", which Excel reads as text. It's a well-known trick and works in every version. Google Sheets and LibreOffice read it too.
  2. Import instead of opening. In Excel: Data → From Text/CSV → in the preview, set the column's type to Text before loading. Never double-click the file.

If the values are mixed — some 4 digits, some 5 — the "pad to length" setting assumes they should all be the same length. If that isn't true for your data, fix the sources instead of the symptoms.