Comma-separated values

Comma-separated values (CSV) is a text file format that uses commas to separate values, and newlines to separate records. A CSV file stores tabular data (numbers and text) in plain text, where each line of the file typically represents one data record. Each record consists of the same number of fields, and these are separated by commas in the CSV file. If the field delimiter itself may appear within a field, fields can be surrounded with quotation marks.[1]

The CSV file format is one type of delimiter-separated file format.[2] Delimiters frequently used include the comma, tab, space, and semicolon. Delimiter-separated files are often given a ".csv" extension even when the field separator is not a comma. Many applications or libraries that consume or produce CSV files have options to specify an alternative delimiter.[3]

The lack of adherence to the CSV standard RFC 4180 necessitates the support for a variety of CSV formats in data input software. Despite this drawback, CSV remains widespread in data applications and is widely supported by a variety of software, including common spreadsheet applications such as Microsoft Excel.[4] Benefits cited in favor of CSV include human readability and the simplicity of the format.[5]

Comma-separated values
A simple CSV file listing three people and the companies they work for
Filename extension.csv
Internet media typetext/csv[6]
Uniform Type Identifier (UTI)public.comma-separated-values-text[7]
UTI conformationpublic.delimited-values-text[7]
Type of formatmulti-platform, serial data streams
Container fordatabase information organized as field separated lists
StandardRFC 4180
  1. ^ "CSV Comma Separated Value File Format - How To - Creativyst - Explored,Designed,Delivered.(sm)". Creativyst Software. Archived from the original on 1 April 2021. Retrieved 22 August 2023.
  2. ^ IBM DB2 Administration Guide. IBM.
  3. ^ "Which are the available formats". Eurostat. Archived from the original on 26 July 2023. Retrieved 22 August 2023.
  4. ^ "Import or export text (.txt or .csv) files". Microsoft Support. Retrieved 2023-08-16.
  5. ^ "What is a CSV file: A comprehensive guide". flatfile.com. Retrieved 2024-10-28.
  6. ^ Cite error: The named reference rfc4180 was invoked but never defined (see the help page).
  7. ^ a b "commaSeparatedText". Apple Developer Documentation: Uniform Type Identifiers. Apple Inc.