What is CSV?
Short answer
CSV (comma-separated values) is a simple text format for tabular data. Each line is a row, and commas separate the values in that row. It is widely supported by spreadsheets, databases, and data tools.
A table as text
CSV stores a table as plain text. The first line is often a header naming the columns, and every following line is a record whose values line up with those columns, separated by commas.
name,role,active
Ada,author,true
Grace,engineer,trueQuoting rules
A value can contain a comma, a quote, or a line break if it is wrapped in double quotes. A quote inside a quoted value is written twice. These rules, described in RFC 4180, are why a real parser is safer than splitting on commas.
name,note
Ada,"Mathematician, writer"