Both hold tabular data and both open in a spreadsheet, which is where the similarity ends.
What each one actually is
CSV is a plain text file. One line per row, values separated by a delimiter. That is the entire specification. No types, no formulas, no formatting, no multiple sheets, no column widths. Any text editor can read it, any language can parse it in a few lines, and it will still open in fifty years.
XLSX is a ZIP archive containing XML files. It stores cell types, formulas and their cached results, number and date formatting, multiple worksheets, charts, conditional formatting, pivot tables, data validation rules, and macros in the .xlsm variant.
The trade is legibility versus capability, and it is a real trade-off either way.
Where CSV wins
- Interoperability. Every database import, every data pipeline, every programming language reads it without a library.
- Streaming. You can process a 20 GB CSV line by line without loading it into memory. You cannot do that with an XLSX.
- Version control. A CSV diffs meaningfully in Git. An XLSX is a binary blob that shows as "changed" with no detail.
- Longevity. Nothing about it can become unreadable.
- Size. For raw data, CSV is smaller than XLSX before compression and comparable after.
Where XLSX wins
- Types survive. A column marked as text stays text. Leading zeros are preserved. Dates are dates, not strings that get reinterpreted on the next machine.
- Formulas. CSV can only hold a formula's result, never the formula.
- Multiple sheets in one file.
- Formatting that carries meaning, highlighted exceptions, conditional colour scales.
- Data validation, which stops bad input at entry rather than catching it later.
- No delimiter or encoding ambiguity. The format specifies both, so a file that opens correctly for you opens correctly for everyone.
The limits worth knowing
Excel caps a worksheet at 1,048,576 rows and 16,384 columns. Hit that limit, which large exports routinely do, and Excel truncates, sometimes with a warning that is easy to click past.
Excel also stores numbers with 15 significant digits. Any longer identifier is silently altered.
Neither limit applies to CSV, which is one reason large data is distributed as CSV even when the recipient will open it in a spreadsheet.
Choosing
Use CSV when:
- Feeding a database, script or data pipeline
- The file is large, or unbounded in size
- It goes into version control
- Long-term archival matters
- The recipient's software is unknown
Use XLSX when:
- A person will read and work in it
- Column types must be preserved exactly (IDs, postcodes, phone numbers)
- You need formulas, multiple sheets or formatting
- You are sending it to a colleague rather than a system
The rule of thumb: CSV for machines, XLSX for humans.
Converting between them
XLSX → CSV loses formulas (you keep their last calculated values), formatting, and every sheet except the one you export. If cached values are stale because the file was saved without recalculating, you export stale numbers.
CSV → XLSX is where the type guessing described earlier does its damage, leading zeros, long numbers, date-like strings. Set column types during import rather than after.
Either way: check identifier columns in the output before sending it anywhere.
A practical middle path
For a recurring report, keep the source data as CSV and generate the XLSX presentation layer from it. The CSV is the record, diffable, streamable, durable, and the spreadsheet is a view.
For one-off work, the CSV viewer opens a file without Excel touching it, the CSV editor gives you a grid to fix cells in, and the delimiter converter handles the semicolon and tab variants. All three run in the browser, so a payroll or customer file is not uploaded to a converter service on its way between two formats.