CSV vs XLSX: the differences, and which one to use
CSV is plain text that every system reads; XLSX is Excel's workbook with types, formatting, formulas and sheets. Here is when to use each and how to convert.
CSV is plain text: a table written out line by line with commas between the values. XLSX is the Excel workbook format: a compressed package that stores values together with their types, formatting, formulas and as many sheets as you like.
Both open in Excel, which makes them look interchangeable. They are not, and choosing the wrong one is how leading zeros, formulas and whole sheets go missing.
The short answer
- Use CSV when data is moving between systems: importing contacts into a CRM, loading a database, sending a feed to an online store, reading a file in Python or R.
- Use XLSX when people will open, edit, format or calculate with the file.
CSV vs XLSX compared
| CSV (.csv) | XLSX (.xlsx) | |
|---|---|---|
| What it is | Plain text, one row per line | ZIP package of XML files (Office Open XML) |
| Readable in a text editor | Yes | No |
| Sheets | One table | Many sheets per workbook |
| Data types | None: everything is text until a program guesses | Numbers, text, dates, booleans stored as such |
Leading zeros (00123) |
Lost when Excel opens the file | Kept if the cell is text |
| Formulas | Saved as their results only | Kept and recalculated |
| Formatting, charts, comments | No | Yes |
| Character encoding | Not recorded; UTF-8 must be chosen on save | Always Unicode |
| Row limit | None in the format itself | 1,048,576 rows per sheet |
| Supported by | Nearly every program and language | Spreadsheet apps and libraries |
| Standard | RFC 4180 (informal) | ECMA-376 and ISO/IEC 29500 |
Where CSV wins
Universal. Any database, programming language, accounting package or e-commerce platform can import CSV. Many accept nothing else.
Transparent. You can open it in a text editor, see exactly what is there, and track changes to it in version control.
Streamable. Programs can read a CSV one line at a time, so files of many gigabytes and tens of millions of rows are routine. XLSX has to be unpacked and parsed as a whole.
Where XLSX wins
Types survive. A ZIP code stays 02134, a date stays a date, and a 20-digit order number stays exact. In a CSV, these are only text, and whatever opens the file decides what they become.
More than one table. Raw data, lookups and a summary can live in one file on separate sheets.
Work stays live. Formulas, PivotTables, charts, conditional formatting and data validation are all saved. A CSV keeps none of them.
No encoding surprises. XLSX always stores text as Unicode. A CSV saved with Excel’s plain “CSV (Comma delimited)” option uses the system’s legacy code page, which can turn names like José into José on another computer. Choose CSV UTF-8 when you save CSV from Excel.
Converting between them
CSV to XLSX. Double-clicking a CSV in Excel converts it on the fly, and that is the moment leading zeros and long IDs are damaged. Converting first keeps them: our CSV to Excel converter detects the delimiter, keeps values with leading zeros or more than 15 digits as text, turns ISO dates such as 2026-03-12 into real date cells and writes a proper .xlsx, all in your browser.
XLSX to CSV. In Excel, File > Save As > CSV UTF-8 exports the active sheet only. To pick any sheet of a workbook, choose a comma, semicolon or tab separator, and get dates written as ISO YYYY-MM-DD, use the Excel to CSV converter. It also writes decimals the way Excel displays them, so 0.1 + 0.2 comes out as 0.3 rather than 0.30000000000000004.
A sensible workflow
- Keep the XLSX as your working file, with formulas and formatting.
- Export a CSV whenever another system needs the data, and treat that CSV as disposable.
- When you receive a CSV, convert it to XLSX before editing, instead of opening it, editing and saving it back as CSV.
New to the format? Start with what a CSV file is. Working with a very large export? See the Excel row limit.
Tools used in this guide
Free, and they run in your browser — nothing is uploaded. See every tool on the CSV & Excel Tools page.
Frequently asked questions
Is CSV or XLSX better?
Neither is better overall. Use CSV to move data between systems, such as imports, exports, databases and code, because every tool reads it. Use XLSX for a file people will work in, because it keeps number types, dates, formatting, formulas and multiple sheets.
Is a CSV file smaller than an XLSX file?
Usually not by much, and sometimes it is larger. XLSX is ZIP-compressed, so a big table of repetitive data can be smaller as XLSX than as CSV. A CSV only wins on size for small files, where the fixed overhead of the XLSX package dominates.
Do I lose anything when I save an Excel file as CSV?
Yes. Only the active sheet is saved, formulas are replaced by their results, and all formatting, charts, comments, data validation and column widths are dropped. Excel warns you about this when you save. Keep the .xlsx as your working copy and export a CSV from it.
Why does my CSV look different after opening it in Excel?
Excel converts types as it opens a CSV: leading zeros disappear from codes like 00123, long numbers become scientific notation, and values such as 3-12 turn into dates. Converting the CSV to XLSX with a tool that keeps those values as text, or importing it through Data > From Text/CSV, prevents this.
Can XLSX files be opened without Excel?
Yes. Google Sheets, Apple Numbers, LibreOffice Calc and many programming libraries read XLSX, because it is an open ISO standard (ISO/IEC 29500, Office Open XML). Some advanced features such as macros or Power Query connections may not carry over.
What is the difference between XLS and XLSX?
XLS is the binary format used by Excel 2003 and earlier, limited to 65,536 rows and 256 columns. XLSX replaced it in Excel 2007 and is a ZIP package of XML files with a limit of 1,048,576 rows and 16,384 columns. Many tools no longer read XLS, so resave old files as XLSX.