Skip to content
RowDesk
FeaturesUse CasesFree toolsPricing
Resources
Free toolsComparisonsGuidesHow it worksFrequently asked questionsSecurity and local processingAbout RowDeskContact
Sign inStart free
ProductHow it worksUse casesGuidesFree toolsSecurityAboutContactPricingSign in
  1. Home
  2. Guides
  3. How to Preserve Leading Zeros in CSV Identifiers (ZIPs, SKUs, Account IDs)
Data Cleaning

How to Preserve Leading Zeros in CSV Identifiers (ZIPs, SKUs, Account IDs)

Stop Excel and Google Sheets from dropping leading zeros on 00123 customer IDs, ZIP codes, and SKUs—and clean identifiers safely in RowDesk without number coercion.

Last verified against first-party documentation: 2026-12-04

In this guide

  1. 1. Why spreadsheets erase leading zeros (and why CSV does not store cell types)
  2. 2. Safe browser-local workflow from start to finish

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.

Expected output comparison: Excel auto-parse vs RowDesk string preservation
Sample Column & InputDesktop Excel / Sheets Auto-OpenRowDesk Clean / Export Result
SKU: 000412412 (3 zeros lost)000412 (preserved verbatim)
ZipCode: 021162116 (invalid 4-digit US ZIP)02116 (preserved verbatim)
AccountCode: 000012341234 (4 zeros lost)00001234 (preserved verbatim)
ExternalKey: 90071992547409979.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.

Sources (last checked 2026-12-04)

  • Google Docs Editors Help (Plain text number formatting in Sheets)
  • Microsoft Support (Keeping leading zeros in Excel)
Clean CSV files with leading zeros preserved verbatim

Related guides

  • Import CSV into Google Sheets Without Losing Leading Zeros
  • How to Clean CSV Data Before Import
  • How to Prepare CSV Data for CRM Import
Browse all RowDesk guides
RowDesk

Clean data. Confident imports.

Clean, deduplicate, compare and prepare CSV and Excel data in your browser before your next business-system import.

Product

FeaturesExamplesHow it worksDedupeComparePricing

Resources

Use casesGuidesComparisonsAll free toolsFree CSV cleanerCSV duplicate removerCompare CSV filesCSV data quality checkerCSV splitterRowDesk vs ExcelFAQLocal processing

Company

AboutChangelogContactPrivacyTermsRefunds

Get product updates

Tips, new features and data prep best practices, delivered to your inbox.

Product updates are coming soon.

© 2026 RowDesk. All rights reserved.

PrivacyTermsRefunds