Runs on your device — your spreadsheet is never uploaded

Open a CSV in Excel without losing leading zeros, SKUs or long numbers

Microsoft’s answer is a twelve-click import wizard you repeat for every file. This scans your CSV before Excel sees it, shows every value that would be destroyed, and hands you a fixed .xlsx — or repairs a file Excel already mangled. Free, unlimited scanning, nothing uploaded.

By Muhammad Rashid Nawaz · Last updated

How do you stop Excel changing your data when it opens a CSV?

Excel changes your data because a CSV file stores no type information, so Excel guesses a type for every value as it parses the file. 12-3 becomes 3 December, 00501 becomes 501, SEPT1 becomes 1-Sep, and a 16-digit barcode becomes 1.23457E+15 with everything past the 15th digit replaced by zeros. Formatting the cells as Text afterwards cannot undo any of it, because the original string was discarded during parsing — the only reliable fix is to hand Excel a file that declares the type, either by importing through Data → From Text/CSV or by opening an .xlsx instead of a CSV.

This tool does both halves of that. It scans a CSV before Excel opens it and shows every at-risk value next to exactly what Excel would turn it into, then writes an .xlsx in which code columns are typed as text while genuine number columns stay numeric. It also repairs files Excel has already damaged — reversing gene-symbol conversions, repairing mojibake, restoring leading zeros — and reports honestly which values are unrecoverable because their digits were never written to the file.

Drop a CSV or TSV file here or click to choose — nothing is uploaded

or paste rows straight from Excel or Google Sheets

Why does Excel change my SKU to a date?

Excel changes a SKU like 12-3 or 3/4 into a date because the value matches one of Excel's built-in date patterns, and a CSV gives Excel no type information to contradict the guess. The same guessing engine strips leading zeros from zip codes, expands 1E5 into 100000, and converts the gene symbol SEPT1 into 1-Sep. Every one of these happens silently, with no warning and no undo, while the file is being parsed — which is why reformatting the cell afterwards never brings the value back.

Here is the full list of conversions this tool detects:

You wroteExcel showsWhyRecoverable?
00501501Numbers have no leading zerosUsually — if every code is the same length
12-33-DecMatches a date patternYes, but day/month order can be ambiguous
1234567890121.23457E+11Column too narrow to show 12 digitsYes — nothing was lost, widen the column
12345678901234561.23457E+15Excel caps numbers at 15 significant digitsNo — the 16th digit is now a zero
SEPT11-SepRead as a month abbreviationYes — the mapping is one-to-one
1E5100000Read as scientific notationYes
+442079460000442079460000Leading + parsed as a formula sign and droppedPartly — the country prefix is lost
+44 20 7946 0000#NAME?Parsed as a formula; the spaces make it invalidNo — the cell holds an error, not the number
3/44-MarRead as a date, not a fractionYes
=SUM(A1)a live formulaExecuted on openYes — and a security problem, see below
JoséJoséUTF-8 read as Windows-1252Yes — fully reversible

How do I stop Excel removing leading zeros from a CSV?

You cannot stop it from inside Excel once the file is open — you have to change what you hand Excel. There are exactly three ways that work: import the CSV through Data → From Text/CSV and set the column type to Text in the preview; format a blank sheet's columns as Text and paste into them; or open an .xlsx that already declares the column as text, which is what the download above produces. Excel drops the zeros because 00501 looks like a number, and a number has no leading zeros — a CSV carries no type flag to say otherwise, whereas an .xlsx stores the type alongside every value.

Renaming the file to .txt also works: Excel then shows the legacy import wizard instead of guessing. It is a real workaround, but you have to repeat it for every file and every colleague you send it to.

Why does Excel turn my long barcode into 1.23457E+15?

Because Excel stores numbers as IEEE 754 binary64 ("double precision") values and then deliberately caps them at 15 significant decimal digits, replacing every digit after the 15th with a zero. The binary64 format itself can carry 15–17 significant decimal digits; the hard 15-digit ceiling is a Microsoft design decision, not something IEEE 754 requires (Microsoft documents this limit). That produces two failures people constantly confuse:

  • A display problem. A 13-digit number in a narrow column shows as 1.23457E+12 but the full value is still there. Widen the column and it comes back. Nothing was lost.
  • A data problem. A number with more than 15 significant digits — a 16-digit payment card number, an 18-digit tracking code, a 15-digit IMEI plus a check digit — has its tail overwritten with zeros the moment it enters a numeric cell. Widening the column does not help, because those digits no longer exist.

So 1234567890123456 does not merely display as 1.23457E+15 — the value in the cell is now 1234567890123450. This is why payment card numbers, IMEIs and long barcodes must be text from the very first moment. Once a 16-digit barcode has been through a numeric cell the file is no longer a reliable record, and the only fix is to re-export it from the source system. The Repair tab tells you which of your values fall on each side of this line rather than silently guessing.

Why does José become José when Excel opens my CSV?

This one is not type coercion — it is a character-encoding mismatch, and it has a different fix from everything else on this page. Your file is UTF-8. Excel, when you double-click a .csv, does not read it as UTF-8. On Windows it falls back to the system code page, usually Windows-1252, and reads each byte as one character.

In UTF-8 the character é is stored as two bytes, C3 A9. Read one byte at a time as Windows-1252, those become à and © — so José appears as José. The mangling is mechanical, which is why it is completely reversible: the original bytes are all still in the file, just misinterpreted. The Repair tab reverses it.

The three fixes, in order of how much you control:

  1. Add a UTF-8 byte order mark to the file. Three bytes (EF BB BF) at the very start tell Excel the file is UTF-8, and it then reads it correctly on a plain double-click. This is what the UTF-8 CSV + BOM download above produces. If you control the export, do this and the problem disappears for everyone downstream.
  2. Import instead of opening. Use Data → From Text/CSV and set File Origin to 65001: Unicode (UTF-8).
  3. Use the .xlsx download. An .xlsx stores text as Unicode by definition, so there is no encoding to guess and no BOM required.

The same failure appears in other formats for the same reason — it is why accented names break in vCard exports, and it is handled in our VCF to CSV converter for exactly that reason.

Why does my CSV open with all the data in one column?

Nothing was destroyed here — this is a separator disagreement, and it is the one problem on this page that a plain re-save will fix. A CSV is comma-separated, but Excel does not necessarily look for a comma. It uses the list separator from your Windows regional settings. In much of Europe and South America that is a semicolon, because the comma is already the decimal separator.

So a comma-separated file opened on a machine configured for semicolons finds no separator at all, and drops every row into column A.

What you seeCauseFix
Everything in column AFile uses commas, Excel expects semicolons (or the reverse)Import via Data → From Text/CSV and choose the delimiter
Splits in the wrong places mid-sentenceUnquoted commas inside field valuesThe exporter is at fault — fields containing commas must be quoted
Rows break apart unexpectedlyLine breaks inside quoted fieldsImport rather than open; Excel handles these correctly only through the wizard
Numbers become text with a stray commaComma used as the decimal separatorMatch the file to your locale, or import and set the column type

There is a documented shortcut: adding a line reading sep=, as the very first line of the file forces Excel to use that separator regardless of regional settings. It works on a double-click, but it is Excel-specific — other software will read that line as a data row. Use it only when Excel is the sole consumer.

The reliable answer is again the .xlsx download above, because an .xlsx has no delimiter at all. Cells are separate elements in the file format, so there is nothing for a regional setting to get wrong.

Why doesn't formatting the column as Text fix it?

Because formatting changes how a value is displayed, not what the value is — and by the time you can click a cell, Excel has already parsed the file and thrown the original string away. This is the most common answer on every forum and it is backwards. Formatting a cell showing 3-Dec as Text does not give you 12-3 back; it gives you 46359, the serial number Excel uses internally for 3 December 2026 (Excel counts days from 30 December 1899, so the number changes with the year Excel guessed).

Formatting as text only works if you do it before the data arrives:

  1. Open a blank workbook and format the destination columns as Text, then paste. Or
  2. Use Data → From Text/CSV and set the column type to Text in the import preview. Or
  3. Open a file that already declares its types — which is what the .xlsx above does.

Should I use Power Query (Data → From Text/CSV) instead?

Data → From Text/CSV is the official answer and it works. In the preview pane, click Transform Data, select each code column, and set Data Type to Text. Say Replace current when Excel offers to add a conversion step.

Where it falls down, honestly:

  • It is roughly a dozen clicks per file, every time.
  • Excel infers types from the first 200 rows by default. If the first 200 zip codes happen to start with a non-zero digit, it will still get it wrong.
  • It is not available in Excel for the web, and it is awkward on Mac.
  • You cannot easily hand the corrected file to a colleague — they have to repeat the whole process.

If you open the same report weekly, learn Power Query — it is genuinely the better tool for a repeating job. For a file you were sent once and need to open now, the .xlsx above is faster and travels with the data.

Is a CSV from untrusted data a security risk?

Yes. A cell beginning with =, +, - or @ is treated as a formula by Excel, LibreOffice Calc and Google Sheets, and evaluated when the sheet opens. OWASP tracks this as CSV Injection (also called formula injection). If your CSV was built from data other people supplied — form submissions, support tickets, uploaded product feeds — a crafted cell can read values out of the sheet and send them to an attacker's URL, and on Windows it can escalate through Dynamic Data Exchange (DDE) to a prompt that runs an external command. It is a vulnerability class, not a formatting nuisance.

The scan above flags every value starting with one of those four characters. Two things worth knowing about the fixes, because most advice on this is wrong:

  • The apostrophe prefix is not reliable. It is the standard advice, but the apostrophe is an Excel input convention, not part of the CSV format — write it into a file and Excel shows a literal '. OWASP's recommended mitigation is a tab character (0x09) inside the quoted field, and it notes that even that can be undone when Excel saves and reopens the file.
  • The .xlsx download is the only fully safe output here. It writes every text value as an inline string, which Excel cannot evaluate as a formula under any setting. The Armoured CSV option wraps values as ="…", which neutralises the payload — the inner text is returned as a literal string, not executed — but the cell still contains a formula, so it is the weaker option.

This is also why you should never build a CSV export by joining strings with commas.

Why does Excel change gene names like SEPT1 to dates?

Because SEPT1, MARCH1 and DEC1 match Excel's month-abbreviation pattern, so they become 1-Sep, 1-Mar and 1-Dec on import. This got bad enough to change a scientific field's naming conventions. Ziemann, Eren and El-Osta found in Genome Biology (2016) that roughly a fifth of papers with supplementary Excel gene lists contained gene names corrupted this way; a 2021 re-run by Abeysooriya et al. in PLOS Computational Biology put the figure at 30.9% — 3,436 of 11,117 articles, higher than before rather than lower.

In 2020 the HUGO Gene Nomenclature Committee gave up and renamed the genes instead of the software: 27 human gene symbols were changed, with SEPT1 becoming SEPTIN1, MARCH1 becoming MARCHF1 and DEC1 becoming DELEC1, under revised guidelines published in Nature Genetics that explicitly added avoiding "symbols that affect data handling and retrieval" as a naming rule. A spreadsheet's autocorrect changed the names of human genes.

The Repair tab recognises these conversions and maps them back, because the correspondence is one-to-one. If your column contains both gene symbols and product codes it shows you both candidate readings rather than silently picking one.

Should I download the .xlsx or the armoured CSV?

Choose the .xlsx unless something downstream specifically requires a CSV file. It is the only output that keeps code columns as text and leaves quantity and price columns as real numbers you can still add up, and it is the only one that is safe against CSV injection by construction.

Protected .xlsxArmoured CSVPlain CSV + BOM
Opens correctly on double-clickYesYesNo
Cells contain values, not formulasYesNoYes
Readable by other softwareWidelyPoorlyYes
Accents surviveYesYesYes
Numbers still work in formulasYes, where genuinely numericNoYes
Safe against CSV injectionYesYesNo

How do I export a CSV that Excel will not damage?

Everything above is damage control. If you control the export, these four rules remove the problem at source:

  • Write UTF-8 with a byte order mark (EF BB BF). Without it Excel assumes the local codepage, which is what turns José into José.
  • Export identifiers as .xlsx with a text type, not as CSV, whenever the consumer is a human with Excel.
  • Escape any value starting with = + - @ with a leading tab character (0x09) inside the quoted field, per OWASP — not an apostrophe, which is an Excel typing convention and does not survive into the file.
  • Never emit a bare number longer than 15 significant digits that you care about. Quote it, prefix it, or ship .xlsx — something in the chain will eventually round it.

Does this work with Google Sheets, LibreOffice and Numbers?

Yes. The .xlsx opens correctly in Google Sheets, LibreOffice Calc and Apple Numbers, and all three make broadly the same guesses as Excel when importing a plain CSV, so the same protection applies. Google Sheets is slightly less aggressive about long numbers but strips leading zeros and converts SEPT1 exactly like Excel does. LibreOffice Calc is the one program that offers a genuine per-column type dialog on every CSV open, which is why LibreOffice users hit this problem least often.

Frequently asked questions

How do I stop Excel changing my numbers to dates?

Formatting the cells as Text after the file is open does not help — the damage happens while Excel parses the file, so by then the original value is already gone. The only reliable fixes are to open the CSV through Data → From Text/CSV and set each column to Text, or to hand Excel an .xlsx that already declares those columns as text. This tool builds that .xlsx for you.

Why does Excel remove the leading zeros from my zip codes and SKUs?

A CSV carries no type information, so Excel guesses. Anything that looks like a number becomes a number, and numbers have no leading zeros. 00501 becomes 501 the moment the file opens. An .xlsx stores the type with the value, so the zeros survive.

Can I recover data Excel has already destroyed?

Sometimes. Gene symbols and mojibake are fully reversible because the mapping is one-to-one. Codes turned into dates are usually reversible but the day/month order can be ambiguous. Long numbers shown as 1.23457E+15 are the bad case: if the file only ever stored six digits, the rest are genuinely gone and no tool can invent them. Paste your file into the Repair tab and it will tell you which category each value falls into.

Why not just wrap every value in quotes?

Quotes only tell a CSV parser where a field ends — they say nothing about type. Excel strips them and then guesses anyway. This is the single most common piece of bad advice on the subject.

What is the ="value" trick, and should I use it?

Writing ="00501" forces Excel to treat the field as a text formula, which does preserve the value. It works, but it breaks almost every other program that reads the file, and the cells contain formulas rather than values. Use it only when Excel is the sole consumer. The Armoured CSV option produces it if you want it.

Is my spreadsheet uploaded anywhere?

No. The file is read and rewritten inside your browser tab. Nothing is sent to a server, which matters because this kind of file usually holds customer records, prices, or order data.

Does this work with Google Sheets and LibreOffice?

The .xlsx opens correctly in both. Google Sheets and LibreOffice make many of the same guesses as Excel when importing a plain CSV, so the same protection applies.

My CSV looks correct in Notepad but wrong in Excel. Which one is right?

Notepad is right. Notepad shows you the bytes that are actually in the file; Excel shows you its interpretation of them. If Notepad shows 00501 and Excel shows 501, the file on disk is still correct and only the Excel view is wrong — until you press Save in Excel, at which point Excel writes its interpretation back over your file and the original is gone.

Does Excel change the file on disk, or only what I see?

Only what you see, until you save. Opening a CSV in Excel does not modify the file. The damage becomes permanent the moment you press Save (or accept the "keep this format?" prompt), because Excel then writes out its parsed values rather than the original text. This is why so many people discover the corruption a week later: the file was fine when it arrived and was destroyed by someone opening and saving it.

Why do I keep hitting this when nobody else on my team does?

Usually regional settings. Excel parses dates using the Windows locale, so 3-12 is 3 December on a UK machine and 12 March on a US one. A file that round-trips cleanly on your colleague's laptop can be silently rewritten on yours. This is also why a date Excel has already converted cannot always be reversed with certainty — the file no longer records which order was assumed.