CSV
CSV (comma-separated values) is a tabular data format that separates fields with commas; RFC 4180 defines the standard, and it is widely used for data import and export.
Purpose
To provide the simplest tabular data exchange format, directly readable and writable by spreadsheets and databases.
Mechanism
Each line is a record, with fields separated by commas. Fields containing commas, quotes, or line breaks are wrapped in double quotes, and a quote inside a quoted field is escaped by doubling it. RFC 4180 specifies CRLF line breaks and an optional header line. Implementations vary in dialect.
Use cases
- Spreadsheet import and export
- Database data migration
- Data analysis (pandas)
- Bulk API data
Examples
- Input
name,age Ada,36OutputA two-row, two-column tableHeader in the first row
Common errors
- An unquoted field containing a comma shifts the columns
- Wrap fields containing the delimiter in double quotes
Related terms
TSV
TSV (tab-separated values) is like CSV but separates fields with tabs, avoiding conflicts with commas inside fields; it is common in database exports and NLP. GLOSSARY
JSON
JSON (JavaScript Object Notation) is a lightweight data interchange format based on JavaScript object literals, using key-value pairs and arrays. GLOSSARY
YAML
YAML (YAML Ain't Markup Language) is a configuration-oriented data serialization format using indentation for hierarchy, supporting comments and references, and better suited to hand editing than JSON. GLOSSARY
Related tools
CSV Converter
Convert between CSV and JSON online. Supports comma, semicolon, and tab delimiters. Free, private, and 100% client-side. TOOL
CSV ↔ HTML
Convert between CSV and HTML table format online. Free, private, and 100% client-side. TOOL
CSV ↔ Markdown
Convert between CSV and Markdown table format online. Free, private, and 100% client-side. TOOL
JSON CSV Converter
Convert between JSON and CSV formats online. Free, private, and 100% client-side. TOOL