What Is a CSV File? Open, Edit and Convert It
CSV — comma-separated values — is the plainest data format in computing: a text file where each line is a row and commas split the row into columns. That’s nearly the whole specification, which is exactly why every spreadsheet, database, bank-export screen and analytics dashboard on Earth can produce one. It is the lingua franca for moving tables between programs that otherwise share nothing.
What the format looks like
A CSV of three customers, with a header row naming the columns:
name,city,notes
Ada Lovelace,London,First programmer
"Torvalds, Linus",Helsinki,"Said ""talk is cheap"""
Grace Hopper,New York,The second row shows the two quoting rules that trip everyone up: a field containing a comma (or a line break) must be wrapped in double quotes, and a literal double quote inside a quoted field is written as two double quotes. The trailing comma on the last row means Hopper’s notes field is simply empty. These conventions are codified in RFC 4180 — a one-page standard that most, though not all, software follows. Hand-splitting CSV on commas breaks the moment a quoted field appears, which is why real parsers exist.
How to open a CSV file
- Excel — double-clicking works, but see the pitfalls below; the safer route is Data → From Text/CSV, which lets you control how each column is interpreted.
- Google Sheets — File → Import, or drag the file into a sheet. Generally gentler with your data than Excel’s double-click, and free on any platform.
- Apple Numbers — opens CSV directly on macOS and iOS with a double-click or a tap; export back out via File → Export To → CSV.
- Any text editor — never forget CSV is just text. Notepad, TextEdit or VS Code will show you exactly what’s in the file, which is the fastest way to diagnose a “corrupted” import that turns out to be fine.
The classic Excel pitfalls
More CSV files are damaged by opening them than by creating them, and Excel’s eager auto-conversion is usually the culprit:
- Leading zeros stripped. ZIP code
02134becomes2134; phone numbers and product codes suffer the same fate, and saving writes the damage back permanently. Import those columns as Text. - Dates invented from thin air. Anything date-shaped gets converted — the gene named
SEPT2famously became September 2nd in so many published spreadsheets that geneticists renamed the gene. - Long numbers mangled. A 16-digit ID collapses into scientific notation (
9.02E+15) and its final digits are rounded to zero. - The semicolon surprise. In much of Europe the comma is the decimal separator, so regional Excel reads and writes CSV with semicolons instead. Receive one of those with US-region settings and the whole file lands in column A. The CSV Delimiter Converter switches between commas, semicolons, tabs and pipes without breaking quoted fields — usually the entire fix.
Converting CSV to other formats
Because CSV is the universal export, it’s constantly the input to developer workflows. Two conversions come up daily. Feeding an API or config with tabular data means converting CSV to JSON — each row becomes an object keyed by the header names, with numbers and booleans detected automatically. And answering “check these 200 order IDs in the database” means turning a CSV column into a quoted SQL list, which is what the CSV to SQL IN converter does — escaping and de-duplicating along the way. Both run in your browser, so the customer data in that export never leaves your machine — a real consideration when the file came out of a CRM.
When CSV beats Excel formats — and when it doesn’t
| CSV wins when… | XLSX wins when… |
|---|---|
| Data moves between different programs or languages | Humans work inside the file itself |
| Files are huge — CSV streams line by line | You need formulas, formatting or charts |
| Version control matters — diffs are readable text | One workbook needs multiple sheets |
| The file should still open in 30 years | Column types must be preserved exactly |
The limits are the flip side of the simplicity: CSV has no formulas, no formatting, no multiple sheets, and no declared column types — everything is text until the reader decides otherwise, which is precisely where the Excel pitfalls above come from. Use CSV as the interchange format it is, do your styling and calculation elsewhere, and keep an eye on any column whose values merely look like numbers. Treat it that way and the format that has survived since the 1970s will outlive every tool that reads it.