Skip to content

What Is a CSV File?

Up to date as of 26 November 2026

A CSV file is a table saved as plain text. CSV stands for "comma-separated values". Business software asks for it because almost every program, from a spreadsheet to an accounting package, can read and write it.

Wikipedia describes CSV informally as1 plain text data consisting of one record per line, with the same sequence of fields on each line, separated by commas.

What's inside one

Open a CSV file in a plain text editor and you'll see something like this:

name,email,city
Ada Reyes,ada@example.com,Denver
Sam Okoye,sam@example.com,Leeds

The first line holds the headings. Every line after it is one record, such as one customer. Each comma marks the edge of a field, which is one cell in spreadsheet terms.2

The RFC on this, number 4180, says the first line may be a header with names that match the fields below it. It also says each record sits on its own line.2

There are no colors, no formulas and no extra sheets. Only the text of each cell survives. That's the point. A file with nothing extra in it is easy for a different program to read.

Two terms worth knowing

A field is one value, like a phone number. A record is one full line of fields, like one customer. A delimiter is the character that separates fields. In a CSV it's usually a comma.

When a value contains a comma

Say a company is called "Smith, Jones and Co". The comma inside the name would split it in two. The fix is to wrap the value in double quotes. RFC 4180 says fields that contain line breaks, double quotes or commas should be enclosed in double quotes.2

"Smith, Jones and Co",billing,Austin

Most programs add those quotes for you when they export. You only meet the problem when someone builds a file by hand.

The format isn't one fixed rulebook

Here's the catch. The RFC notes that the CSV format had never been formally documented before it was written, and it was published as information only.2 Different programs make different choices.

  • Some use a semicolon or a tab where others use a comma. Microsoft's help page says a comma "typically" separates fields, which leaves room for exceptions.3
  • Spaces count as part of a field and shouldn't be ignored, so a stray space before a name is data, not padding.2
  • A CSV file doesn't say which character encoding it uses. Wikipedia notes the format isn't limited to one encoding.1

That last point explains why accented letters sometimes turn into odd symbols after an import.

What a CSV file can't hold

Because it's only text, a CSV file loses anything a spreadsheet adds on top. Microsoft's guidance says the different file formats support different feature sets, so saving as CSV can drop features.3 Formulas become their results. Formatting disappears. Only the current sheet is saved.

So keep your original spreadsheet. Treat the CSV as a copy made for moving data, not as the master file.

Where you'll meet CSV files

How software reads a CSV fileOpen the file as plain textRead the first line as headingsRead each later line as one recordSplit every line at the commas
A CSV file is read line by line, then split at each comma.

When a file misbehaves, open it in a text editor first. What you see there is what the receiving software sees, with no spreadsheet display in the way.

Reference list

  1. Comma-separated values, Wikipedia
  2. RFC 4180: Common Format and MIME Type for Comma-Separated Values (CSV) Files, RFC Editor (IETF)
  3. Import or export text (.txt or .csv) files, Microsoft Support