← 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 (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.
  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.

The one honest limit: nested data

This is the part I want to be straight about, because a lot of tools hand-wave it. The converter works on flat objects — string, number, and boolean values. If a value is itself a nested object or array, it does not get flattened into extra columns. It'll be stringified, which for a nested object means you get an unhelpful [object Object] in the cell.

CSV and spreadsheets are fundamentally flat — a two-dimensional grid — while JSON is a tree. There's no single "correct" way to squash arbitrary nesting into columns, so the tool doesn't guess. What to do instead:

  • Flatten first. Reshape your JSON so nested fields become top-level keys — e.g. turn {"address": {"city": "NYC"}} into {"address_city": "NYC"} — before converting. A quick pass in the JSON Formatter or a small script does it.
  • Pull out the array you actually want. Often the useful table is one level down (response.results). Grab that array and convert it.
  • For deep, irregular nesting, a script (Python's pandas.json_normalize, or jq) is the right tool — that's genuinely a coding job, not a paste-and-click one.

For the overwhelmingly common case — a flat list of records from an API or DB — none of this matters and it just works.

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. 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? No — it converts flat objects (string, number, boolean values). Nested objects or arrays aren't expanded into columns; a nested object would show as [object Object]. Flatten your JSON first (e.g. address.cityaddress_city) or extract the specific array you want, then convert. For deep nesting, a script with pandas.json_normalize or jq is the better fit.

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 🐨