.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
CSV samples should be judged in the sizes people actually receive, upload, or export. These reference cards show the common shapes and settings to check before choosing a conversion target.
spreadsheet export
Checks headers, delimiters, quoting, and encoding.
log stream
Checks append-friendly parsing and per-line recovery.
international data
Avoids broken names, commas, and non-Latin text.
batch import
Checks streaming, memory use, and preview limits.
Reference dimensions are platform-style targets. Compatibility and format facts are verified from the linked online sources below.
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