text/*
text/csv
File extensions: .csv
Comma-Separated Values — the universal tabular data format.
What is text/csv?
text/csv is the media type for comma-separated values files. Every spreadsheet and BI tool can import CSV, which is why it is the default export format for tabular data on the web.
Typical usage
Data exports for spreadsheets, database bulk imports, analytics tools.
Common gotchas
Some European locales use semicolons instead of commas because the comma is a decimal separator. Include an appropriate Content-Disposition header if you want the browser to download rather than preview.
HTTP header example
Response header
Content-Type: text/csv; charset=utf-8Reference
RFC 4180
Frequently asked questions
What is the text/csv MIME type?
text/csv is the media type for comma-separated values files. Every spreadsheet and BI tool can import CSV, which is why it is the default export format for tabular data on the web.
What file extension does text/csv use?
Files served as text/csv typically use the extension .csv. The most common is .csv.
How do I set the Content-Type for text/csv?
Send the HTTP response header Content-Type: text/csv; charset=utf-8. Data exports for spreadsheets, database bulk imports, analytics tools.
Is text/csv an official MIME type?
Yes. text/csv is officially registered with IANA (RFC 4180), so standards-conformant clients recognize it.
What are common mistakes with text/csv?
Some European locales use semicolons instead of commas because the comma is a decimal separator. Include an appropriate Content-Disposition header if you want the browser to download rather than preview.