CSV File Format (Comma-Separated Values)
CSV (Comma-Separated Values) is the simplest and most universally supported data exchange format. A CSV file is plain text where each line represents a row of data and values within each row are separated by commas (or other delimiters like semicolons or tabs). CSV has no formal standard, though RFC 4180 provides widely followed guidelines. The format is used to transfer tabular data between virtually any application: databases, spreadsheets, programming languages, CRM systems, and data analysis tools all support CSV import and export. CSV strength is its simplicity — any text editor can open and edit a CSV file, and any programming language can parse it with minimal code.
Quick Facts
- Extension: .csv
- MIME Type: text/csv
- Category: document
Advantages
- Universal compatibility across all platforms and languages
- Human-readable plain text format
- Extremely small file sizes
- Can be opened in any text editor
- Simplest format for data import/export
Disadvantages
- No support for formatting, formulas, or multiple sheets
- No standardized way to specify data types
- Delimiter conflicts with data containing commas
- No support for hierarchical or nested data
- Character encoding issues (UTF-8 vs. ANSI) cause garbled text
Common Use Cases
- Data exchange between databases and spreadsheets
- Bulk import/export for CRM and ERP systems
- Data science and machine learning datasets
- E-commerce product catalog uploads
- Log file analysis and data processing
Technical Details
CSV files consist of records (rows) separated by line breaks (CRLF or LF) and fields (columns) separated by a delimiter character. Fields containing the delimiter, line breaks, or double quotes are enclosed in double quotes. Embedded double quotes are escaped by doubling them (""). RFC 4180 specifies CRLF line endings, comma delimiter, and optional header row. The BOM (Byte Order Mark, U+FEFF) is sometimes prepended for UTF-8 CSV files to help Excel detect the encoding. TSV (Tab-Separated Values) is a CSV variant using tab characters as delimiters.
Frequently Asked Questions about CSV
How do I open a CSV file in Excel?
Double-click the file or use File > Open in Excel. If columns are not properly separated, use the Text Import Wizard and specify the correct delimiter and encoding.
Why does my CSV show garbled characters?
This is a character encoding issue. The file is likely UTF-8 but your application expects ANSI (or vice versa). In Excel, use the import wizard to specify UTF-8 encoding.
Can CSV files have multiple sheets?
No. CSV is a single-table format. For multiple sheets, use XLSX or export each sheet as a separate CSV file.
How do I convert CSV to XLSX?
FileChange converts CSV to XLSX in your browser. The comma-separated data is parsed and placed into a properly formatted Excel spreadsheet.
What delimiter should I use?
Comma is the standard. Use semicolon if your data contains commas (common in European locales where comma is the decimal separator). Use tab for data that may contain commas and semicolons.