.csv — Comma-Separated Values
A simple table exchange format that looks easy until quoting, encoding, and delimiters matter.
About this format
CSV stores table rows as text. The simplicity is why it is everywhere, but real files can vary in delimiter, quotes, line endings, encoding, and header conventions.
Use CSV for spreadsheet-style data exchange. Use JSONL for event streams or nested records.
Real-world samples & file sizes
Four real CSV datasets from public repositories. Each preview is generated from the actual header and first rows, so it shows the shape of the downloaded table rather than a generic spreadsheet icon.

World Population CSV
A country-year population table with many rows and a compact four-column schema.

Taxi Trips CSV
A wider CSV with timestamps, numeric amounts, payment labels, and location fields.

Seattle Weather CSV
A weather time-series CSV with dates, numeric measurements, and categorical labels.

Stock Prices CSV
A small long-form CSV with a symbol column, date strings, and numeric prices.
Pros
- +Human-readable
- +Works with spreadsheets and databases
- +Easy to stream and inspect
Cons
- −No native types
- −Quoting and delimiter rules vary
- −Poor for nested data
CSV vs other formats
| vs | Size | Quality | Note |
|---|---|---|---|
| JSONL | CSV is often smaller for flat tables | CSV is tabular | JSONL handles nested records and event streams better. |
| XLSX | CSV is usually smaller | No formatting or formulas | CSV is data exchange, not a workbook. |
Where it works
- Any text editor
- spreadsheet apps
- database tools
- Browsers download or parse CSV through app code
- Excel
- Google Sheets
- Numbers
- PostgreSQL
- Python/R
Frequently asked questions
- Does CSV always use commas?
- Not always. Some locales and tools use semicolons or tabs, even when the file is described as CSV.
- Why did Excel break my CSV?
- Encoding, separators, dates, and automatic type conversion are common causes.
Sources
- RFC 4180 - Common Format and MIME Type for CSV Files - CSV format and text/csv registration
- IANA media type text/csv - registered media type