# Comma-Separated Values (CSV)

> A table in plain text. Each row is one line, and commas split the columns.

**Field:** Software Development  
**Category:** Files & Formats  
**Also known as:** CSV, CSV file

## Think of it like

Think of it like a table drawn with commas instead of lines. Each row is a line, and commas split the boxes.

## Definition

CSV is a plain text file that holds a table. Each line is one row, and commas split the row into columns. The first line usually holds the column names. Every spreadsheet app can open and save CSV, and so can most databases. It is simple, but it has no types: a number and a word look the same.

## Example

Lucy exports her shop's 1,200 orders as a CSV file. Her accountant opens it straight away in a spreadsheet.

## Example code

```csv
name,age
Ada,36
Sam,29
```

A header line, then one person per line.

## Why it matters

CSV is the easiest way to move a table between programs. Almost everything can read it.

## Common mistake

Not putting quotes around a value with a comma in it. The row then splits into too many columns.

## Three principles

- **One row per line.** Commas split the columns.
- **Header first.** The top line names the columns.
- **No types.** Everything is read as text.

## Related terms

- [JavaScript Object Notation (JSON)](https://learn.benibix.com/term/development/json)
- [Extensible Markup Language (XML)](https://learn.benibix.com/term/development/xml)
- [Array](https://learn.benibix.com/term/development/array)
- [String](https://learn.benibix.com/term/development/string)

## Taught in

- [JSON, XML and CSV](https://learn.benibix.com/learn/development-formats/json-xml-and-csv): File Formats, 3/11

---

Source: https://learn.benibix.com/term/development/csv
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
