← All posts

How to Convert JSON to CSV or Excel

2026-07-24

Short answer: Paste a JSON array of objects into the JSON to CSV converter and click Convert to get CSV, or use the Download Excel button to get a real .xlsx file. Each object becomes a row, and the columns come from the keys. It all runs in your browser — handy, because JSON exports from APIs and databases are usually full of names, emails, and other data you'd rather not paste into a random server.

If you've got a chunk of JSON and someone wants it in a spreadsheet, this is the two-minute path. Let me show you exactly what it does — and, just as importantly, what it doesn't do, so you're not surprised.

What the converter expects

The input is a JSON array of objects — the shape almost every API and export uses:

[
  { "name": "Alice", "age": 30, "city": "New York" },
  { "name": "Bob", "age": 25, "city": "San Francisco" }
]
  • Each object is one row.
  • The columns are the union of all keys across every object. So if one row has an extra field the others don't, that field still becomes a column — rows without it just get an empty cell there. You don't have to make every object identical.
  • Values get properly CSV-escaped — anything containing a comma, quote, or newline is wrapped in quotes so the file stays valid.

How to convert

  1. Open JSON to CSV.
  2. Paste your JSON array, open or drop a .json file, or hit the Sample button to see the expected shape.
  3. Pick a delimiter if you want something other than a comma — semicolon (common in European locales where the comma is the decimal mark) or tab.
  4. Click Convert to see the CSV, then Copy or Download it (as data.csv, or named after the .json file you opened).
  5. Or click Download Excel to get a proper .xlsx file that opens straight in Excel, Numbers, or Google Sheets.

The Excel export is a real spreadsheet file, not a CSV with a renamed extension — so Excel won't nag you about format, and the columns land in their own cells without an import wizard. It also shows you a quick row and column count so you can sanity-check that everything came across.

Nested data, and the one honest limit

CSV and spreadsheets are a flat, two-dimensional grid; JSON is a tree. Here is exactly what the converter does with the tree parts:

  • Nested objects become dotted columns. {"name": "Ada", "address": {"city": "NYC", "zip": "10001"}} gives you the columns name, address.city and address.zip, however deep the nesting goes.
  • Lists (arrays) go into one cell as JSON text. {"tags": ["admin", "beta"]} becomes a tags cell holding ["admin","beta"]. A list has no fixed length, so there's no honest way to turn it into columns — and the page tells you which columns got this treatment.
  • A wrapped response is unwrapped. If you paste a whole API response like {"count": 2, "results": [ … ]}, the one list of objects inside it is used as the rows (and the page says which key it used). If there are several lists, it asks you to paste the one you want.
  • Numbers are copied as written. A 19-digit ID stays 19 digits and 1.10 stays 1.10 — the usual parse-and-stringify shortcut would quietly turn 12345678901234567890 into 12345678901234567000. Excel itself keeps only 15 significant digits, so in the .xlsx longer numbers are stored as text rather than rounded.

The limit: a list of objects nested inside each row (say, every order with its own list of line items) is a second table, not a few more columns. It ends up as JSON text in one cell. If you need one row per line item, that's a reshaping job for a script — Python's pandas.json_normalize, or jq — or pull out that inner list and convert it on its own.

Why do it in the browser

JSON payloads are where the sensitive stuff lives: user records, order data, emails, tokens. Pasting that into a server-side converter means handing it to someone whose logging you can't see. This tool never sends your data anywhere — the parsing, CSV building, and even the Excel file generation all happen locally (the spreadsheet library loads on demand, right in the page). Open DevTools → Network while you convert and you'll see zero requests carrying your data.

It goes the other way too: the same tool converts CSV back to JSON if you flip the mode — useful when someone hands you a spreadsheet and you need structured data out of it. See the companion guide on converting CSV to JSON for that direction.

FAQ

How do I convert JSON to CSV? Paste a JSON array of objects into the JSON to CSV converter and click Convert. Each object becomes a row and the object keys become the column headers. Then copy the result or download it as a .csv file (named after the file you opened, or data.csv). It runs entirely in your browser.

Can I convert JSON straight to an Excel file? Yes — click Download Excel and you get a real .xlsx file that opens directly in Excel, Numbers, or Google Sheets, with data in proper cells. It's a genuine spreadsheet file, not a CSV renamed, so there's no import wizard or format warning.

Does it handle nested JSON objects? Yes, within reason. Nested objects become dotted columns (address.city), and lists are written into a single cell as JSON text (["a","b"]). A list of objects inside each row — a table within the table — stays as JSON text too; for one row per inner item, use a script with pandas.json_normalize or jq, or convert that inner list on its own.

How are the columns decided? From the union of all keys across every object in the array. If some objects have a field others lack, it still becomes a column — rows missing it get an empty cell. So your objects don't need identical keys.

Is my JSON uploaded anywhere? No. Parsing, CSV generation, and the Excel export all run locally in your browser — the spreadsheet library is loaded on demand into the page, not on a server. You can verify there are no data requests in DevTools → Network. That matters because JSON exports often contain personal or sensitive data.

— Milo 🐨