What Is This?
The text/csv MIME type indicates that the content is a Comma-Separated Values (CSV) file. CSV is a simple tabular data format where each line represents a row and commas separate columns. It is widely used for data export, import between spreadsheet applications, and data interchange with legacy systems.
Common Uses
Data export from databases and analytics platforms
Spreadsheet import/export (Excel, Google Sheets)
Large dataset downloads for data analysis
Bank statements and financial data exports
Examples
Supported by all browsers. Browsers typically open CSV in Excel or other spreadsheet applications depending on user settings.
The .csv file extension maps to text/csv as its MIME type.
Related Entries
More from this reference:
text/html
The MIME type for HTML documents, the standard markup language for web pages.
text/plain
The MIME type for plain text files with no formatting or markup.
text/css
The MIME type for Cascading Style Sheets used to style HTML documents.
text/javascript
The MIME type for JavaScript source files used to add interactivity to web pages.
Frequently Asked Questions
Should I include a BOM in CSV files?
Including a UTF-8 BOM (byte order mark) at the start of CSV files helps Excel correctly interpret UTF-8 encoding, especially when the file contains non-ASCII characters. Without the BOM, Excel may display characters incorrectly.
How do I handle commas within CSV fields?
Enclose fields containing commas, newlines, or double quotes in double quotes. Use two double quotes inside a quoted field to represent a literal double quote character. This is defined in RFC 4180.