Skip to content
Spreadsheet4 min read

CSV vs XLSX: Which Should You Use for Your Data?

Short answer

CSV is plain text holding exactly one table, readable by every system ever built. XLSX is a real workbook with formulas, formatting, types and multiple sheets. Use CSV to move data between systems, XLSX when the data needs to do anything.

Published · Checked

The fundamental difference

A CSV file is text: rows separated by newlines, fields separated by commas. That is the entire specification, more or less, and it is why every database, programming language and spreadsheet on earth can read one.

An XLSX file is a ZIP archive of XML describing cells, their types, their formulas, their formatting, and the relationships between multiple sheets. It carries far more information, at the cost of being much harder to parse.

CSV and XLSX compared
CSVXLSX
Multiple sheetsNoYes
FormulasNoYes
FormattingNoYes
Data typesNone — everything is textPreserved
File sizeVery smallLarger
Universal supportYesCommon but not universal
Human-readableYes, in any text editorNo

Why CSV eats your leading zeros

CSV stores no type information. A product code written as 007 is just three characters, and any spreadsheet reading the file has to guess what they mean. It guesses 'number', and the leading zeros disappear.

The same mechanism turns long numbers into scientific notation, reformats dates according to whatever locale the application assumes, and occasionally converts gene names into dates — a problem serious enough that geneticists renamed several genes.

None of this is a bug in the converter. It is CSV working as specified, which is to say barely specified at all.

What a converter can do is refuse to guess in the one case where guessing is almost always wrong. FileTools360 keeps a digit string beginning with a zero — 007, 01234, 00 — as text, because zero-padding marks an identifier rather than a quantity. Genuine numbers are unaffected: 0, 0.5 and 0.0 are still numbers. Excel will still do the old thing when you double-click a CSV, so the advice below is about Excel rather than about the file.

The separator is not always a comma

In locales where the comma is the decimal separator — much of continental Europe — spreadsheet software exports CSV using semicolons instead. The file is still called CSV.

A converter that assumes commas will read such a file as a single column. FileTools360 detects the delimiter by testing which candidate produces the most consistent column count across rows, which handles the common cases without asking.

  • Moving data between systems → CSV
  • Data with formulas, formatting or several sheets → XLSX
  • Codes with leading zeros, or long numeric IDs → XLSX, where the cell type is recorded. Quoting them in the CSV does not reliably help: most readers strip the quotes before deciding the type
  • Handing data to a script or database → CSV or JSON

Sources

Try it

FAQ

Related questions

Will converting XLSX to CSV lose my formulas?

Yes — each formula is replaced by its computed value, because CSV cannot express a formula. Formatting, charts and any sheets beyond the first are also dropped. That is inherent to CSV rather than a limitation of the conversion.

How do I stop Excel destroying my leading zeros?

Import rather than open: use Excel's Data → From Text/CSV, and set the column type to Text during import. Better still, keep the data in XLSX where the cell type is recorded and cannot be misinterpreted.

Which is better for large datasets?

CSV, comfortably. It streams line by line without loading everything into memory, and stays far smaller. XLSX also has a hard limit of about 1,048,576 rows per sheet, which large datasets exceed.

Runs entirely in your browser

FileTools360 by the numbers

527 converters and tools65 file formatsnothing ever uploaded.