Home : File Formats : CSV Definition

CSV

Stands for "Comma-Separated Values." CSV is a standard way to store structured data in a plain text format. It is a common export option in desktop applications and some websites. Most spreadsheet programs can import data from a .CSV file.

A list of comma-separated values represents a table. Each line in a CSV file is a row and the value between each comma is a column. The first row is often a table header containing labels for each column. Since the data in a CSV file represents a table, each line should have the same number of comma-separated values.

CSV Format

Since CSV files use the comma character "," to separate columns, values that contain commas must be handled as a special case. These fields are wrapped within double quotation marks. The first double quote signifies the beginning of the column data, and the last double quote marks the end. If the value contains a string with double quotes, these are replaced by two double quotes, or "".

Below are some standard CSV formatting rules:

  1. Table data is represented using only plain text.
  2. The first line may or may not represent the table header.
  3. Rows are separted by line breaks (newline characters).
  4. Columns (fields) are separated by commas.
  5. All lines contain the same number of values.
  6. Fields that contain commas must begin and end with double quotes.
  7. Fields that contain line breaks must begin and end with double quotes (not all programs support values with line breaks).
  8. All other fields do not require double quotes.
  9. Double quotes within values are represented by two contiguous double quotes.

Example CSV Data

The following three lines represent a table with three rows and four columns, starting with a table header.

ID,Website,URL,Description
1,TechTerms,https://techterms.com,"TechTerms, the Computer Dictionary"
2,Slangit,https://slangit.com,"Slangit, the ""Clean Slang"" Dictionary"

The data above may be displayed in a table like this:

IDWebsiteURLDescription
1TechTermshttps://techterms.comTechTerms, the Computer Dictionary
2Slangithttps://slangit.comSlangit, the "Clean Slang" Dictionary

Using CSV Files

A *.csv file can be opened, viewed, and edited in any text editor. However, because of the minimalistic nature of the CSV format, the data is often difficult to read. Therefore, it is best to view CSV files in a spreadsheet program like Microsoft Excel or Apple Numbers. These applications parse the comma-delimited data and display the values as a table within a spreadsheet.

File extension: .CSV

Updated: July 18, 2020

Cite this definition:

https://techterms.com/definition/csv

TechTerms - The Tech Terms Computer Dictionary

This page contains a technical definition of CSV. It explains in computing terminology what CSV means and is one of many file format terms in the TechTerms dictionary.

All definitions on the TechTerms website are written to be technically accurate but also easy to understand. If you find this CSV definition to be helpful, you can reference it using the citation links above. If you think a term should be updated or added to the TechTerms dictionary, please email TechTerms!

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe at any time.
Questions? Please contact us.