CSV vs Excel vs JSON: Which Data Format Should You Use?
Tables of data travel in three common shapes: CSV files, Excel workbooks and JSON documents. They look similar when opened, yet they behave very differently when you import them into another program, send them to a developer or keep them for ten years. This guide explains what each one is good at, where each one tends to bite, and how to move between them with a minimum of surprises.
CSV: simple text, rows and columns
CSV stands for comma-separated values. It is plain text where each line is a row and separators divide the columns. Because it is plain text, nearly every program can read and write it, it is tiny, and you can open it in any text editor. The cost of that simplicity is that CSV holds no formatting, no formulas, no multiple sheets and no data types: everything is text, and the receiving program guesses what is a number or a date. CSV also has no single official dialect. Some files use commas, others semicolons or tabs, and files may use different text encodings. These details cause most CSV headaches, covered in our guide to fixing garbled CSV.
Excel (XLSX): a full workbook
An XLSX file is a compressed package holding one or more sheets, with typed cells, number and date formats, formulas, styles, charts and more. It is the best choice when people will work with the data by hand: sorting, filtering, calculating and presenting. It is a poorer choice for exchanging raw data with software, because the file is heavier, contains presentation details a program does not need, and can hide surprises such as merged cells, header rows in odd places, or numbers stored as text. Excel also tries to be helpful in ways that damage data, for instance dropping leading zeros from codes or turning gene names and long numbers into dates or scientific notation.
JSON: structured, nested data
JSON is a text format for structured data: objects with named fields, lists, numbers, true/false values and nesting. It is what web APIs and many applications use. Unlike CSV, it has real types and can describe a record that contains a list of other records, which a flat table struggles to represent. Unlike XLSX, it is easy for programs to read. It is not a friendly format for people to edit in bulk, and a large JSON file is noticeably bigger than the same data as CSV because field names repeat in every record.
Quick comparison
- Sharing with anyone, lowest risk of compatibility problems: CSV.
- Working by hand, with formulas, formatting or several sheets: Excel.
- Feeding an application, website or API; nested data: JSON.
- Long-term archiving of simple tables: CSV, because plain text will remain readable.
- Very large datasets: CSV is the most compact of the three, ideally compressed in a ZIP or GZIP file. See ZIP, GZIP and TAR compared.
Converting between them: what our tools do
All of these conversions run in your browser:
- CSV to Excel turns CSV or TSV into an XLSX workbook.
- Excel to CSV exports a sheet as CSV.
- CSV to JSON turns each row into an object in a JSON array. You can set the delimiter or let the tool detect it, and choose whether numbers and true/false values are converted from text.
- JSON to CSV flattens a JSON array into rows and columns.
- Excel to JSON and JSON to Excel do the same with workbooks.
When you convert, remember the structural gap: a table is flat and JSON can be nested. Deeply nested JSON must be flattened to fit into columns, so some structure is lost on the way, and arrays of mixed shapes can produce sparse tables with many empty cells. Test with a small sample first.
Step by step: CSV to JSON
- Make sure the first row of your CSV holds clear column names; they become the field names in JSON.
- Open CSV to JSON, choose the file or paste the text.
- Leave the delimiter on automatic detection, or choose comma, semicolon, tab or pipe if the preview looks wrong.
- Decide on "Convert numbers and true/false". Keep it on for real numbers. Turn it off if you have codes such as
00123or phone numbers that must remain text. - Run the conversion, inspect the first few records, and download.
Pitfalls worth knowing
Leading zeros and long numbers
Postcodes, product codes and phone numbers are identifiers, not quantities. If a tool treats them as numbers, 007 becomes 7. Keep them as text when converting, and do not let a spreadsheet program reformat them while you view the file.
Dates
The date 03/04/2026 means March 4 in some countries and April 3 in others. Prefer the unambiguous ISO form, such as 2026-04-03, in files you exchange.
Commas and line breaks inside cells
Valid CSV wraps such cells in double quotes. Hand-made files often forget, which shifts columns. If your columns look misaligned, this is the first thing to check.
Empty versus missing
An empty CSV cell can become an empty string, a null or an omitted field in JSON, depending on the tool. Know which your receiving program expects.
Cleaning before converting
Trailing spaces, blank rows and duplicate rows are common. CSV Clean trims spaces, drops empty rows and removes duplicates before you convert.
A simple rule
Keep one source of truth in the format that suits the work, usually Excel for human editing or CSV for raw data, and generate the others when you need them. Treat conversions as exports, not as the master copy. If you need to share the table with a developer, send CSV or JSON, not XLSX, and include a line describing the columns and the encoding. That one sentence prevents most back-and-forth.
Written by SmarTech Apps. General information only, not legal or professional advice. Questions or corrections? Contact us.