What is CSV (Comma-Separated Values)?

CSV is a plain-text tabular format where each line is a row and fields are separated by commas, used to move data between spreadsheets, databases, and tools.

CSV, short for Comma-Separated Values, is the most common interchange format for tabular data. Each line of the file is a record, and within a line, individual fields are separated by a delimiter - usually a comma. The first line is often a header row naming each column. Because CSV is just plain text, it can be opened in any spreadsheet, database, text editor, or programming language, which is why it remains the default export format for CRMs, ad platforms, and email tools.

Despite its simplicity, CSV has no single formal standard, and that causes real friction. Fields that contain commas, line breaks, or quotes must be wrapped in double quotes and escaped, but not every program does this consistently. Different tools also disagree on delimiters - European locales frequently use semicolons because the comma is a decimal separator - and on character encoding, where a missing UTF-8 byte-order mark can turn accented names into garbage.

For anyone importing lead lists or exporting campaign data, understanding CSV quirks prevents silent data loss. A common failure is a name like "Smith, Jr." splitting into two columns because it was not quoted, shifting every subsequent field. Verifying the delimiter, checking the header row, and confirming the encoding before import saves hours of cleanup later.

CSV converts cleanly to and from richer formats. Converting CSV to JSON is useful for feeding APIs, CSV to SQL generates insert statements for databases, and CSV to Markdown or HTML produces readable tables for documents and web pages. When a comma delimiter is problematic, switching to TSV (tab-separated values) or another delimiter avoids most quoting headaches.

Examples

  • name,email,company\nAda Lovelace,ada@example.com,Analytical Engines
  • A quoted field: "Smith, Jr.",jsmith@example.com - the comma stays inside one column
  • Semicolon-delimited CSV common in German and French Excel exports

Common questions

Why does my CSV open as one column in Excel?
Excel is likely expecting a different delimiter for your locale. Either change the delimiter to match (comma vs semicolon) or use Excel's Text Import Wizard to specify it explicitly.
How do I keep leading zeros in a CSV?
CSV stores everything as text, so the zeros are in the file. The loss happens when a spreadsheet auto-formats the column as a number. Import the column as text to preserve values like ZIP codes and phone numbers.
What is the difference between CSV and TSV?
They are identical except for the delimiter - CSV uses commas, TSV uses tabs. TSV avoids most quoting problems because tabs rarely appear inside data fields.

Related tools

Related terms for CSV (Comma-Separated Values)