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 by Per C.

quizTest Your Knowledge

In what decade was the C programming language developed?

A
1970s
0%
B
1980s
0%
C
1990s
0%
D
2000s
0%
Correct! Incorrect!     View the C definition.
More Quizzes →

The Tech Terms Computer Dictionary

The definition of CSV on this page is an original definition written by the TechTerms.com team. If you would like to reference this page or cite this definition, please use the green citation links above.

The goal of TechTerms.com is to explain computer terminology in a way that is easy to understand. We strive for simplicity and accuracy with every definition we publish. If you have feedback about this definition or would like to suggest a new technical term, please contact us.

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe or change your frequency setting at any time using the links available in each email.

Questions? Please contact us.