Leading zeros vanish when spreadsheets auto-convert delimited text like 02116 or 00001234 into floating-point numbers upon file open. Cleaning, merging, converting, and editing your CSV inside RowDesk keeps every identifier as an exact string from import through export.
Sample CSV input (leading-zero-identifiers-sample.csv)
Synthetic identifier fixture combining 6-digit SKUs, East Coast 5-digit ZIP codes, 8-digit account codes, and a 16-digit ID beyond 15-digit float precision.
SKU,ZipCode,AccountCode,ExternalKey,Description 000412,02116,00001234,9007199254740997,Boston Warehouse Kit 009881,07302,00005678,9007199254740999,Jersey City Terminal Unit
1. Why spreadsheets erase leading zeros (and why CSV does not store cell types)
Plain CSV files store raw text characters, not data-type metadata. When you double-click a CSV in Excel or import with automatic type detection in Google Sheets, the spreadsheet guesses that 02116 is the number 2116 and that 16+ digit keys (9007199254740997) are IEEE 754 floats (truncating low digits to 9.0072E+15). Saving back over the CSV makes that loss permanent.
By contrast, RowDesk treats every CSV cell—and XLSX cells formatted with leading-zero masks when read via Convert Excel to UTF-8 CSV—as literal text strings across cleaning, merging, splitting, JSON conversion, and export.
| Sample Column & Input | Desktop Excel / Sheets Auto-Open | RowDesk Clean / Export Result |
|---|---|---|
SKU: 000412 | 412 (3 zeros lost) | 000412 (preserved verbatim) |
ZipCode: 02116 | 2116 (invalid 4-digit US ZIP) | 02116 (preserved verbatim) |
AccountCode: 00001234 | 1234 (4 zeros lost) | 00001234 (preserved verbatim) |
ExternalKey: 9007199254740997 | 9.0072E+15 (last digits corrupted) | 9007199254740997 (exact precision kept) |
2. Safe browser-local workflow from start to finish
Keep the untouched backup export safely aside, then process leading-zero-identifiers-sample.csv in CSV Cleaner, Merge CSV Files, CSV Editor Online, or JSON CSV Converter (which intentionally preserves CSV cells as strings in CSV -> JSON mode so 000412 never turns into numeric 412).
If an upstream team already saved the data inside an Excel .xlsx workbook with a Zip Code / 00000 custom format mask, run it through Convert Excel to UTF-8 CSV instead of File -> Save As CSV so formatted leading zeros export cleanly.
- Inspect raw files in a plain-text viewer or CSV Data Quality Checker—never double-click raw CSVs in Excel before cleanup.
- Clean whitespace and placeholder rows inside CSV Cleaner without casting identifier columns.
- Use Google Sheets File -> Import with Convert text to numbers, dates, and formulas unchecked if you must open output in a sheet—see our Google Sheets Leading Zeros Guide.
