ToolKitSphere IconToolKitSphere
JSON & Format Converters

CSV vs Excel: What's the Real Difference?

Online Tools Platform Team6 min read

Excel opens CSV files, so it is easy to assume they are the same thing in different wrappers. They are not. One is a text file with commas in it; the other is a compressed archive of XML documents describing a live calculation environment. Understanding where the line falls tells you which format to reach for and, more usefully, what you are throwing away each time you convert.

For the underlying format rules — quoting, delimiters, encoding — see The Complete Guide to CSV Files and Formatting. This post is about the comparison.

What each format actually stores

A CSV is a sequence of characters. Records separated by line breaks, fields separated by a delimiter, quotes where a field contains something structural. That is the entire specification surface. There is no place to record that a column holds dates, no place for a second table, no place for a cell colour.

An XLSX file is a ZIP archive. Rename one to .zip, unpack it, and you will find a directory of XML files: one per worksheet, a shared string table, a styles document, and a relationships manifest tying them together. Inside, each cell carries a type attribute, an optional formula, and a reference to a style record. The format was standardised as Office Open XML and is read by LibreOffice, Google Sheets, Numbers, and every serious spreadsheet library.

That structural difference produces every practical difference between them.

CSV XLSX
Structure plain text zipped XML
Sheets one many
Formulas none yes, live
Formatting none fonts, colours, number formats, conditional rules
Cell types none — everything is text text, number, date, boolean, error
Charts and pivots none yes
Macros none in XLSM
Streamable yes, line by line no, must unzip and parse
Diffs in Git cleanly as a binary blob
Human-readable raw yes no

Where CSV wins

Interoperability. Every database, every analytics tool, every language's standard library reads CSV. Reading XLSX requires a library that understands the archive layout, and plenty of environments do not have one.

Streaming. A CSV can be processed one line at a time, so a 40 GB file works on a laptop. XLSX must be decompressed and parsed as a document before you can read row one.

Version control. A one-cell change in a CSV is a one-line diff. The same change in an XLSX rewrites a compressed archive, and Git records the whole file as changed with no readable diff.

Transparency and safety. You can read a CSV in any text editor and see exactly what a recipient will get. There are no hidden sheets, no cached results, no macro payload. For sending data outside your organisation, that predictability is worth a lot.

Size. A 50,000-row table is a few megabytes as CSV and considerably more as XLSX once styles and shared strings are included.

Where Excel wins

Anything a human does interactively. Formulas that recalculate, filters, pivot tables, conditional formatting, freeze panes. None of this survives a trip through CSV, because none of it exists in CSV.

Type fidelity. This is the underrated one. An XLSX cell knows whether it holds the number 01234 or the string "01234". A CSV does not, so the receiving application guesses — and Excel's guesses in particular will strip leading zeros and mangle dates in ways that are easy to miss and impossible to undo after a save.

Multiple related tables. A workbook with a data sheet, a lookup sheet, and a summary sheet is one file. As CSV it is three files with no link between them, and exporting it produces only the active sheet — silent data loss that catches people out constantly.

Choosing between them

Ask who or what opens the file next.

If the answer is a person who will edit, calculate, or present, use XLSX. If the answer is a system — an import wizard, a COPY into Postgres, a Python script, an ETL job, a Git repository — use CSV. If the answer is both, ship CSV as the source of truth and let the person build their workbook from it, rather than trying to make one file serve two purposes.

There is also a legibility question. If the data has to be auditable — a reader needs to confirm exactly what was sent — CSV is honest in a way a workbook is not.

Converting without damage

XLSX to CSV is intrinsically lossy and that is fine as long as it is deliberate. Before exporting, check the sheet count, and convert formula columns to values so you know what you are getting. Set date columns to a text format of yyyy-mm-dd first, otherwise the export writes them in your locale's format and the recipient has to guess between day-first and month-first.

CSV to XLSX is where damage happens, because import is the moment types get inferred. Never double-click a CSV you care about. Use Data → From Text/CSV and mark identifier columns — postcodes, phone numbers, SKUs, account references — as Text in the import preview. Google Sheets has the same trap under File → Import; turn off "Convert text to numbers, dates, and formulas".

There is a second trap on the way in: the delimiter. Excel uses your system's list separator, which is a semicolon in many European locales, so a comma-delimited file opened on a German or French machine lands entirely in column A. That is a delimiter mismatch, not a broken file, and the import wizard lets you set the separator explicitly.

Before either conversion, it is worth knowing what is in the file. A CSV Analyzer reports the detected delimiter, column count, inferred types per column, and any rows whose field count disagrees with the header — which is exactly the list of things that will go wrong during import. If the file itself is malformed rather than merely surprising, our guide to repairing broken CSVs covers the fixes.

For output that needs to be tidy before it goes anywhere, a CSV Formatter normalises the quoting and line endings. Both tools run entirely in your browser, so a payroll extract or customer list stays on your machine.

A third option worth knowing

When the destination is an application rather than a spreadsheet, neither format may be right. APIs, config systems, and JavaScript front ends want JSON, and a CSV to JSON converter turns a header row into object keys directly. It is a better fit than XLSX for anything programmatic, and unlike CSV it can express nesting when the data has some.

The honest summary: CSV is a transport format, XLSX is a working document, and JSON is what applications talk. Most of the pain people attribute to CSV comes from asking it to be a working document.

Frequently asked questions

Is a CSV file the same as an Excel file?

No. A CSV is plain text that Excel can open; an Excel workbook is an XLSX file, a ZIP archive of XML documents. Excel displays both in a grid, which is why they feel identical, but only one of them stores formulas, formatting, and multiple sheets.

Should I save my data as CSV or XLSX?

Save as XLSX if a person will work in the file — formulas, several sheets, formatting. Save as CSV if a system will read it: an import, a database load, a data pipeline, or anything that goes into version control.

Does converting XLSX to CSV lose data?

Yes, by design. You keep the values of one sheet and lose every other sheet, all formulas (replaced by their last computed results), all formatting, charts, pivot tables, comments, and cell type information.

Why is my CSV smaller than the equivalent Excel file?

CSV stores only characters. XLSX stores the values plus styling, shared strings, sheet relationships, and metadata as XML — compressed, but still far more content. For plain tabular data a CSV is typically a fraction of the size.

Can a CSV have multiple sheets?

No. A CSV is one table in one file. Exporting a multi-sheet workbook to CSV writes only the active sheet, which is a frequent source of quietly missing data. Export each sheet separately if you need all of them.

Do CSV files support formulas?

No. If you type =SUM(A1:A10) into a cell and save as CSV, the file stores the literal text of the formula, not a live calculation. Reopen it and Excel may re-evaluate it as a formula, which means the value can change between saves.

Which format is safer to send to someone else?

CSV, on two counts. It cannot carry macros, so it cannot execute anything, and its contents are fully visible in a text editor — no hidden sheets, no stale cached values, no tracked changes you forgot to remove.

Try the related tools

Related articles