| Extension | .csv |
|---|---|
| MIME type | text/csv |
| Signature | none |
| Specification | RFC 4180 (2005) |
| Type | table, plain text |
CSV
Comma-Separated Values
CSV stores a table as plain text: one line of the file is one row of the table, and the values are separated by commas. The format existed long before its first description in RFC 4180, which is why many dialects exist.
Rules
- A value containing a comma, a quote or a line break is enclosed in double quotes.
- A quote inside such a value is doubled:
"He said ""yes""". - The first line often holds the column names.
Common problems
In many European locales spreadsheet programs expect a semicolon as the delimiter, because the comma is the decimal separator there. The second classic problem is the encoding: to make a UTF-8 table open correctly, a byte order mark (BOM) is sometimes added at the start of the file.