UtilityNest

JSON to CSV

Paste JSON or open a .json file and get a clean table. Nested objects are flattened into columns like address.city, you decide how arrays are handled, and the result downloads as CSV or as an Excel file.

How to use JSON to CSV

  1. 1Paste JSON into the box, or open or drop a .json, .jsonl or .ndjson file.
  2. 2If the JSON holds several lists, choose which array becomes the rows.
  3. 3Choose how arrays inside records are handled: joined in one cell, one column per item, one row per item, or kept as JSON text.
  4. 4Untick any columns you do not need and check the preview table.
  5. 5Download CSV (with an optional BOM for Excel) or switch the output to Excel and download an XLSX file.

How nested JSON becomes a table

API responses and exports are rarely flat. The converter finds the list of records automatically, even when it sits inside a wrapper such as {"data": [...]} or {"results": {"items": [...]}}, and lets you pick another list if there are several. Every nested object is flattened into columns named with dot paths: contact.email, address.geo.lat and so on. Columns appear in the order they are first found, and a record that lacks a field gets an empty cell.

JSON Lines files, with one JSON object per line, are recognized as well.

A single object that is not in a list, such as one record {"id": 1, "name": "Kim", "orders": [...]}, becomes one row. If it holds a list you would rather use, pick that list under Rows come from, or choose One row per item to repeat the record for each item.

Four ways to handle arrays

  • Join values in one cell: ["vip", "new"] becomes vip; new. Arrays of objects are kept as JSON text.
  • One column per item: tags.0, tags.1, orders.0.sku, orders.1.sku and so on.
  • One row per item: pick an array such as orders and get one row per order, with the customer fields repeated on each row. This is the layout pivot tables need.
  • Keep as JSON text: every array is written as JSON in a single cell.

CSV or Excel output

CSV output can use comma, semicolon, tab or pipe delimiters, and the Excel-friendly option adds a UTF-8 BOM so non-English text opens correctly in Excel. Excel output keeps numbers and true/false as real values, keeps strings like 007 as text, and adds filter buttons to the header row. Large files are processed in a background thread, so the page stays responsive. To check or tidy the JSON first, use the JSON Formatter. To convert the other way, use CSV to JSON.

Same orders, four table shapes (tested)

We converted three orders, each with a nested customer object, an items array (2, 1 and 3 items) and a tags list:

Array handlingRowsColumnsGood for
Join values in one cell35One line per order; items stay as JSON text
One column per item315Few, fixed-length lists
One row per item67Pivot tables, totals per product
Keep as JSON text35Re-importing into another system

Details worth knowing from that run:

In One column per item, columns appear in the order they are first met, so items.2.sku from the third order landed at the far right, after tags, and an order with an empty tags list also produced a separate empty tags column. In One row per item, order-level fields repeat on every item row. Summing an order-level value (such as a shipping fee) over those rows counts it once per item, so total it from the original data or with a distinct count.

Before you open the CSV in Excel

The phone numbers in our test (01012345678) came out of the converter exactly as in the JSON. Double-clicking the CSV in Excel would still turn them into 1012345678, because Excel guesses types when it opens a CSV. Two ways around it: switch the output to Excel and download an XLSX, where strings stay text, or download the CSV and open it through CSV to Excel. Keep the Excel-friendly BOM option on for any CSV that will be opened in Excel, so non-English text displays correctly.

Frequently asked questions

How are nested objects converted?

They are flattened into columns named with dot paths. {"user": {"name": "Kim"}} becomes a column called user.name.

What if my JSON has an error?

The tool shows the line and column of the first error with a short explanation, for example a missing comma or quote, so you can fix it in the box.

Can I choose which columns to export?

Yes. Every column found in the data is listed with a checkbox. Untick the ones you do not need and the preview and download update.

Can I open the result in Excel?

Yes. Either download CSV with the Excel-friendly BOM option, or switch the output to Excel to get an XLSX file directly.

Are very large numbers kept exactly?

JSON numbers with more than 15 to 16 significant digits cannot be represented exactly in a browser and may be rounded. IDs like that should be strings in the JSON, and strings are kept exactly.

Which array option should I choose?

Choose by the question you want to answer. One row per order: Join values in one cell. Totals per product or a pivot table: One row per item. Short lists with a fixed number of entries: One column per item.

Why do totals look too high after One row per item?

Order-level fields repeat on each item row, so summing them counts them once per item. Sum only the item-level columns, or take order-level totals from a one-row-per-order export.

Why is there an empty column with the array's name?

In One column per item, a record whose array is empty produces a column with the bare array name and no values. You can untick it in the column list.

Why did an API response turn into one row with very long column names?

The tool looks for a list of records. Some APIs send a single result as an object instead of a one-item array; in our test such a response became one row with columns like response.body.items.item.stationName, while the two-item version became a clean table. Untick the columns you do not need, or ask the API for more than one result.

Related guides