Files and data

What is CSV?

Short for Comma-separated values.

CSV is a plain-text format that stores table rows as lines and separates the fields in each row with a delimiter, usually a comma.

How it works

CSV is the lowest common denominator for tables. Every spreadsheet, database and programming language can read and write it, which makes it the usual way to move simple tabular data between systems.

Each line is one row. Within a line, a delimiter separates the fields. Fields containing that delimiter, quotes or line breaks are wrapped in double quotes, and a quote inside a quoted field is doubled. Some regions and exports use semicolons or tabs instead of commas, so the delimiter matters when importing.

CSV vs XLSX

Feature CSV XLSX
Stored as Plain text Zipped XML workbook
Sheets One Many
Formatting and formulas No Yes
Data types Everything is text Numbers, dates, text
Opens in Anything Spreadsheet software

Use CSV to exchange data between systems. Use XLSX when people need formatting, formulas or multiple sheets.

A practical example

The row name,quantity contains two fields. A value such as "Smith, Alex" needs surrounding quotes so its comma doesn’t create another column.

What to watch out for

CSV doesn’t preserve workbook sheets, cell styling or data types. Spreadsheet software may interpret postal codes as numbers and remove leading zeros, or read dates in the wrong order.

Tools you can use

Go a little deeper

Common questions

Can I open a CSV file without Excel?

Yes. A CSV is plain text, so any text editor can open it, and Google Sheets, LibreOffice and Apple Numbers all import it as a table.

Why does Excel put all my CSV data in one column?

The file uses a different delimiter from the one Excel expects for your region, typically semicolons instead of commas. Import it and choose the delimiter explicitly.

Why did my leading zeros disappear?

The spreadsheet decided the column holds numbers and dropped the zeros. The CSV itself still contains them. Import the column as text to keep values such as 00123 intact.

Related terms

Browse the complete file format glossary →