Most data you’ll handle at work ends up in one of three formats: CSV, JSON or an Excel workbook. They can hold the same information, but each is good at different things, and choosing the wrong one creates friction for everyone downstream.
Here’s how they differ, when to use each, and what to watch for when you convert between them, because that’s where most of the trouble happens.
Try it: CSV ⇄ JSON ⇄ ExcelConvert between CSV, JSON, TSV and Excel (.xlsx) with automatic delimiter detection, type detection and a table preview.
Open tool — freeThe quick comparison
| CSV | JSON | Excel (.xlsx) | |
|---|---|---|---|
| Structure | Flat rows and columns | Nested objects and arrays | Sheets of rows and columns |
| Data types | None; everything is text | Strings, numbers, booleans, null | Numbers, dates, text, formulas |
| Human-readable as text | Yes | Yes, when formatted | No, it’s a zipped XML package |
| Formatting and formulas | No | No | Yes |
| Multiple tables in one file | No | Yes | Yes, as sheets |
| Best for | Imports, exports, simple data exchange | APIs, config, app data | Analysis and sharing with people |
When to use CSV
CSV (comma-separated values) is the lowest common denominator. Nearly every database, spreadsheet, CRM and analytics tool can import and export it. That universality is its main strength.
Use CSV when:
- The data is a single flat table, such as a contact list, order export or product catalog.
- You’re moving data between systems that don’t share any other format.
- Files are large and you want something that can be processed line by line.
The weakness is that CSV has no types and only a loose standard. A ZIP code like 02134 may lose its leading zero when a spreadsheet opens it, and long ID numbers can be turned into scientific notation. Dates are just text, and nobody can tell whether 03/04/2026 means March 4 or April 3 without context.
When to use JSON
JSON is the default format for web APIs and much application data. It handles nesting naturally: an order can contain a customer object and an array of line items, all in one record.
Use JSON when:
- Data is hierarchical or records have different shapes.
- Programs are exchanging data, especially over HTTP.
- You need to keep types, so numbers stay numbers and
truestays a boolean.
JSON is awkward for people who want to scan or edit hundreds of rows, and its syntax is strict. If you’re fighting parse errors, see common JSON errors and how to fix them.
When to use Excel
Excel workbooks are for people. They keep formatting, formulas, multiple sheets, charts and real date and number types. If the final reader is a manager, accountant or client, a workbook is usually what they want.
Avoid Excel files as an interchange format between systems where you can. They’re harder to process automatically, and formulas, merged cells and hidden sheets cause surprises in imports. A common pattern is to keep the data as CSV or JSON and produce an Excel file only for the human end of the pipeline.
Converting between formats
Our free CSV, JSON and Excel converter runs in your browser, so your data stays on your device. It detects delimiters and data types automatically and shows a table preview before you download.
- Upload or paste your CSV, TSV, JSON or Excel data.
- Check the detected delimiter and the table preview. Make sure columns line up and headers are in the first row.
- Review the detected types, especially for IDs, ZIP codes and phone numbers that should stay as text.
- Choose the output format: CSV, TSV, JSON or Excel.
- Download the result and open it in the target program to confirm it looks right.
If your source data is stuck in a PDF, such as a bank statement or an invoice, use the PDF to Excel converter to rebuild the table first, then convert from there. Check the totals afterward, since tables in PDFs can be laid out in ways that confuse any extraction tool. The guide on converting bank statements to Excel goes into detail.
Delimiters, encodings and other gotchas
Delimiters
Despite the name, not every CSV uses commas. In many European locales, the comma is the decimal separator, so spreadsheets there export with semicolons. Tab-separated files (TSV) avoid the problem because tabs rarely appear in data. If a file opens with everything crammed into column A, the delimiter is the issue. Re-import it and specify the delimiter explicitly rather than editing the file by hand.
Quoting
Fields that contain the delimiter, a quote or a line break must be wrapped in double quotes, and quotes inside them doubled: "Smith, Jr." or "He said ""hi""". Hand-built CSV often gets this wrong. Generate CSV with a library or tool instead of joining strings.
Encoding
Use UTF-8 unless a system specifically requires something else. Accented names turning into strings like é means a UTF-8 file was read as a different encoding. Some versions of Excel open CSV files more reliably when the UTF-8 file starts with a byte order mark (BOM), while some other tools dislike the BOM. If your file will mainly be opened in Excel, exporting to .xlsx avoids the question entirely.
Flattening nested JSON
CSV can’t hold nesting, so JSON has to be flattened when you convert. Nested objects typically become dotted column names: {"address": {"city": "Austin"}} becomes a column called address.city. Arrays are harder. You can:
- Join them into a single cell, such as
red; blue; green, which is fine for tags. - Spread them across numbered columns, such as
items.0anditems.1, which only works when arrays are short. - Create one row per array item and repeat the parent fields, which suits order line items.
Decide based on what the person receiving the file needs to do with it. Converting back from flattened CSV to nested JSON works best when the column names follow a consistent pattern.
The takeaway
Use CSV for flat data moving between systems, JSON for nested data and APIs, and Excel when a person is the final reader. When converting, check the delimiter, keep everything in UTF-8, protect IDs and ZIP codes from being turned into numbers, and decide deliberately how nested data should be flattened. A quick look at the table preview before you download catches most problems.
Frequently asked questions
Should I use CSV or JSON for my data?
Use CSV for flat, tabular data that people will open in a spreadsheet or import into a database. Use JSON when the data is nested or is being exchanged between programs and APIs.
Why does my CSV look wrong when I open it in Excel?
Usually it is the delimiter or the encoding. Excel may expect a semicolon instead of a comma depending on your regional settings, and non-UTF-8 files or missing BOMs can garble accented characters.
Can you convert nested JSON to CSV?
Yes, but nested objects have to be flattened into columns, often with names like address.city, and arrays inside records need a decision: join them into one cell, split them into numbered columns or create extra rows.



