KeepLeadingZeros.com

Keep leading zeros in CSV files: open as text, export Excel-safe XLSX

Excel silently turns 00123 into 123, long IDs into 1E+15 and SEPT1 into a date. Inspect your CSV as literal text, choose columns to lock as text, and export a verified XLSX. Your original file is never changed.

CSV value 00123 becomes 123 in Excel, but stays 00123 with Text-Safe Top row: 00123 goes to Excel and becomes 123 with a red warning. Bottom row: 00123 goes through Text-Safe and stays 00123 with a green check. 00123 Excel 123 ⚠ 00123 Text-Safe 00123 ✔

Text-safe CSV to XLSX tool

  1. 1 Load
  2. 2 Inspect
  3. 3 Choose
  4. 4 Export
  5. 5 Verify

Drop a CSV here or choose a file. It stays on your device.

Preview as literal text (first 50 rows; flagged cells highlighted)

Column risks: choose what to force as text

Advertisement

What this tool does

KeepLeadingZeros.com reads your CSV as plain strings, flags values Excel commonly corrupts (leading-zero IDs, numbers over 15 digits, date-like tokens), and exports an XLSX where chosen columns are explicit text cells. A SHA-256 check proves the original file was untouched, and a round-trip check confirms every exported cell matches.

Why Excel breaks CSV files

A CSV has no data types. When Excel opens one, it guesses a type for every cell. Guesses are often wrong for identifiers: zeros are dropped, digits past the 15th become zero, and short hyphenated or month-like strings become dates. Re-saving as CSV makes the damage permanent.

How to use it

  1. Load your CSV (drag and drop or choose a file).
  2. Review the highlighted preview and per-column risks.
  3. Pick the columns to force as text.
  4. Export the XLSX and the report.
  5. Check the verification message.

What it detects

RiskExampleWhat Excel does
Leading-zero ID00123Becomes 123
Long number (16+ digits)1234567890123456789Digits after the 15th become 0
Scientific lookalike1E5Becomes 100000
Date-like token1-2, Mar-1, SEPT1Becomes a date
Trailing-zero decimal1.10Becomes 1.1
Formula start=SUM(A1)Runs as a formula (security risk)
Phone-like plus+4412345Plus sign dropped

Privacy and security

Everything runs in your browser. The contents of your CSV are never uploaded, and this tool does not store your files. This site shows ads from Google AdSense, which may use cookies. See the Privacy Policy for details and your choices.

Advertisement

FAQ

How do I keep leading zeros when opening a CSV in Excel?

Export the data to an XLSX where those columns are text cells, as this tool does.

Why does Excel change my long ID numbers to 1E+15?

Excel keeps 15 significant digits, so longer numbers are rounded and shown in scientific notation.

Why did Excel turn my text into dates?

Strings like 1-2, Mar-1 or SEPT1 look like dates, so Excel converts them on open.

Does this upload my file?

No. All processing is local to your browser.

Will the XLSX keep my values exactly?

Yes. Every cell is written as a string and then re-read and compared with the original.

Can I convert back to CSV safely?

Text cells export to CSV with their characters intact, but reopening that CSV in Excel can corrupt it again.

How is this different from Excel’s text import wizard?

The wizard needs manual setup every time. This tool flags risky columns for you and gives a report and proof.

Which Excel versions work?

The output is a standard .xlsx file that opens in any modern Excel, Google Sheets and LibreOffice.

Guides