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
- Load your CSV (drag and drop or choose a file).
- Review the highlighted preview and per-column risks.
- Pick the columns to force as text.
- Export the XLSX and the report.
- Check the verification message.
What it detects
| Risk | Example | What Excel does |
|---|---|---|
| Leading-zero ID | 00123 | Becomes 123 |
| Long number (16+ digits) | 1234567890123456789 | Digits after the 15th become 0 |
| Scientific lookalike | 1E5 | Becomes 100000 |
| Date-like token | 1-2, Mar-1, SEPT1 | Becomes a date |
| Trailing-zero decimal | 1.10 | Becomes 1.1 |
| Formula start | =SUM(A1) | Runs as a formula (security risk) |
| Phone-like plus | +4412345 | Plus 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.
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.