lookup> .csv

.CSV·File Extension

CSV Data FileComma-separated values for tabular data interchange.

Data & Texttext/csvCompressible
Extension.csv
File typeCSV Data File
MIME typetext/csv
CategoryData & Text
Charset
CompressibleYes
Format familycsv

What is a .csv file?

A .csv file is a CSV Data File — Comma-separated values for tabular data interchange.

In the mime-db registry it maps to text/csv, and it is marked as compressible. When serving .csv over HTTP, set the Content-Type header as shown in Developer info below.

Related entities: it maps to text/csv and is used by CSV among others — and is delivered over HTTP via the Content-Type header.

  • Use Excel or VS Code to open and edit .csv files.
  • Any text editor (Notepad, VS Code) can inspect the raw content as text.

When served over HTTP, responses should set the following header:

Content-Type: text/csv

Common software that reads/writes .csv:

ExcelVS CodePython
.csvextension of
format
csvserved as
mime type
text/csvsent via header
http header
  • Tabular data export and import
  • Spreadsheet interchange
  • Machine-learning datasets
  • Open the file with Excel, make your changes and save.
  • Most editors preserve the original formatting and encoding — avoid changing the charset.
  • Create a new file and save it with the .csv extension, or export this format from Excel.
name,age,city
John,30,New York
Ada,36,London
  • Header row — column names
  • Data rows — comma-separated values

What programs can open .csv files?

Common options include Excel, VS Code, Python. You can also open many of these files with built-in viewers or a browser.

How do I create a .csv file?

Create a new file in any text editor or the app that owns the format and save it with the .csv extension.

What is the relationship between .csv and the text/csv MIME type?

text/csv is the media type identifier used for .csv files during network transfer (for example in the HTTP Content-Type header).

Related extensions

Related MIME types

Related programming languages

Related headers

Related methods

Related status codes