Runs in your browser

CSV Leading Zero Tool

Pad ZIP codes, SKUs, and IDs so spreadsheet apps keep the zeros.

Your files never leave your device.

Drop a CSV with ZIP codes, SKUs, or IDs

CSV, TSV, or text. Processed locally — the file is never uploaded.

Try a sample:

Why zeros disappear

CSV is text. Spreadsheets are not. When Excel opens a file it casts \u201c02115\u201d to the number 2115. New England ZIP codes, UK sort codes, and zero-padded product IDs are the usual casualties.

How this tool preserves them

You pick columns and a width. Digit values are left-padded with zeros. Download can wrap those columns in Excel formula quotes so a double-click open still shows 02115. The original file is not modified.

Example

zip,sku
2115,7

Padded to width 5 and 3:

zip,sku
02115,007

Limitations

If zeros were already stripped before you received the file, this tool cannot know whether 2115 was 02115 or 002115. You supply the width from the identifier\u2019s spec.

FAQ

Why does Excel still drop zeros after I quote the field?

Double-clicking a CSV lets Excel guess types. Enable Excel-safe formula quotes, which writes ="02115" as a CSV field so Excel keeps the text.

What width should I use?

US ZIP codes: 5. ZIP+4: 9. Many SKUs and account numbers have a documented length. Padding a 12-digit GTIN to 5 would be wrong.

Are non-numeric SKUs padded?

No. Only values that are entirely digits (optional sign) are padded. Mixed SKUs such as A007 are left alone.

Related tools