JSON vs CSV vs Excel: Which Data Format Should You Use?
By SimpleTools24Published 4 min read
Use JSON when data has nested structure or moves between programs, especially APIs and configuration. Use CSV for simple flat tables that need to be imported by almost any tool. Use Excel (XLSX) when people will read, filter, format or calculate with the data, or when you need several tables in one file. Each format is good at one job and awkward at the others, which is why converting between them is so common.
In this guide
The Three Formats in Brief
JSON
JavaScript Object Notation is a text format for structured data: objects (key–value pairs), arrays, strings, numbers, booleans and null. It nests to any depth, and almost every programming language reads it. The standard is RFC 8259, which also requires UTF-8 for data exchanged between systems.
CSV
Comma-Separated Values is plain text with one record per line and fields separated by commas. RFC 4180 describes a common form, including quoting fields that contain commas, quotes or line breaks, but many programs deviate from it, using semicolons, different quoting or different encodings.
Excel (XLSX)
XLSX is the Office Open XML spreadsheet format: a ZIP archive containing XML files for worksheets, styles and shared strings. It stores typed cells, formulas, formatting, multiple sheets and much more. A worksheet holds up to 1,048,576 rows and 16,384 columns.
Side-by-Side Comparison
| JSON | CSV | Excel (XLSX) | |
|---|---|---|---|
| Structure | Nested objects and arrays | Flat table | Grids across multiple sheets |
| Data types | String, number, boolean, null | None; everything is text | Number, text, boolean, date, formula |
| Schema in the file | Keys repeated per record | Optional header row | Header row by convention |
| Human readability | Fair, better when formatted | Good for small files | Excellent |
| Machine readability | Excellent | Good, but dialects vary | Needs a library |
| File size | Larger (keys repeated) | Small | Compressed, usually compact |
| Multiple tables | Yes, in one document | No, one table per file | Yes, multiple sheets |
| Formatting, formulas | No | No | Yes |
| Size limits | None in the format | None in the format | 1,048,576 rows per sheet |
Data Types: The Hidden Difference
This is where data most often gets damaged in conversions:
- CSV has no types. The value
00742is just text. Whether it stays00742or becomes742depends on the program opening it. Excel, opening a CSV directly, will usually drop the zeros. - JSON has a few types.
00742written as a string stays a string;742written as a number is a number. But JSON has no date type, so dates are strings by convention, typically ISO 8601. - Excel has rich types, but numbers are stored as double-precision floating point, so integers longer than 15 significant digits lose precision. Dates are stored as serial numbers with a display format.
So a 16-digit ID can travel safely as a JSON string, be stored as text in an XLSX cell, and still be ruined by someone opening a CSV in Excel.
Nesting: JSON's Strength
JSON naturally represents an order with a customer object and a list of line items. CSV can't represent that without flattening or repeating data, and Excel needs either flattened columns or several linked sheets. How to convert nested JSON to Excel covers those options in detail.
Size and Performance
JSON repeats every key in every record, so it's the most verbose of the three for tabular data. CSV is compact and streams easily line by line. XLSX is compressed internally, so files are often smaller than the equivalent CSV, but reading one requires unzipping and parsing XML.
Very large CSV and JSON files are best handled by tools that stream them; spreadsheets have hard row limits. How to open large CSV files covers what to do when Excel can't cope.
When to Use Each Format
Use JSON for:
- API requests and responses
- Configuration files and application data
- Data with nested or variable structure
- Exchange between programs written in different languages
Use CSV for:
- Simple exports and imports between systems and databases
- Very large flat datasets that are processed line by line
- Data that must be readable by almost any tool
Use Excel for:
- Reports and data that people will read, sort and filter
- Calculations, charts and pivot tables
- Sharing several related tables in one file
- Data where types, such as numbers and dates, must be preserved for non-technical users
Converting Between Them
- JSON → Excel: flatten nested objects, decide how to handle arrays, and keep long IDs as text. An online JSON to Excel converter does this interactively in your browser and writes a genuine
.xlsxwith typed cells. The walkthrough is in how to convert JSON to Excel. - Excel → CSV: each sheet becomes its own CSV, and formatting and formulas are lost.
- CSV → JSON: each row becomes an object; every value starts as a string unless the converter infers types.
Frequently Asked Questions
Is JSON better than CSV?
For nested or typed data, yes. For large flat tables processed line by line, CSV is simpler and smaller.
Why does Excel change my CSV data?
When opening a CSV, Excel guesses types, which can drop leading zeros, convert values that look like dates, and round long numbers. Importing via Power Query lets you set column types.
Can a JSON file be opened in Excel?
Yes, through Power Query's JSON import, or by converting it to XLSX first. See how to open a JSON file in Excel.
Which format is smallest?
Usually XLSX (compressed) or CSV. JSON is largest for tabular data because keys repeat.
Summary
JSON for structure and APIs, CSV for simple portable tables, Excel for people. Most data problems come from moving between them carelessly, so pay attention to types and nesting whenever you convert.
Related tools
Sources
- RFC 8259 – The JSON Data Interchange Format – IETF (opens in a new tab)
- RFC 4180 – Common Format and MIME Type for CSV Files – IETF (opens in a new tab)
- Excel specifications and limits – Microsoft Support (opens in a new tab)
Related articles
- How to Convert JSON to ExcelThree ways to turn JSON into a proper XLSX spreadsheet, and the data-type pitfalls to avoid.
- Open Large CSV FilesWhat to do when a CSV is bigger than Excel's row limit, from quick viewing to proper analysis.
- Open a JSON File in ExcelImport JSON into Excel with Get Data, expand records and lists into columns, and fix common Power Query errors.