plumb

How to convert JSON to CSV?

How to Convert JSON to CSV (Including Nested JSON)

APIs and apps export JSON, but most people work in spreadsheets. Flat JSON converts easily. Nested JSON, with objects inside objects and arrays of line items, is where conversions go wrong: you end up with '[object Object]' or one giant cell.

Plumb is built on a simple idea: the data your business runs on should be trustworthy before anyone draws conclusions from it. Cleaning, checking and reshaping data should not need macros, scripts or a weekend. Plumb keeps your files private, shows every change it proposes, and lets you approve fixes instead of hunting for problems by hand.

How Plumb helps: Data extraction

Plumb's data extraction reads JSON of any shape, shows you the structure as a tree, and suggests how to flatten it: nested fields become columns like customer.address.city, and arrays become separate rows or a related table. You choose, preview and export to CSV or Excel.

How It Works

The key decision is what to do with nested arrays: expand them to rows, or split them into a second table.

  1. In Excel: Data > Get Data > From File > From JSON, then in Power Query click To Table and use the expand icon on each nested column.
  2. In Python: pd.json_normalize(data, record_path='items', meta=['id', 'date']).to_csv('out.csv', index=False) flattens nested records.
  3. On the command line: jq -r '.[] | [.id, .name] | @csv' data.json > out.csv for simple extractions.
  4. Check the result: row count should match the number of records (or line items, if you expanded arrays).
  5. In Plumb: upload the JSON, pick which nested fields become columns or rows, preview and export.

Where This Helps

API exports

Turn Stripe, Shopify or CRM API responses into spreadsheets.

App logs

Flatten event logs into columns you can filter and pivot.

Order data

Expand orders with line items into one row per item.

early access

Try Plumb in early access

Plumb is in early access. Join the waitlist on tryplumb.pro to get an invite. Early access covers Excel (.xlsx), CSV and JSON files, and we are adding more sources as people ask for them. Your files are processed privately and are never used to train models.

From JSON to a table you can use

Now you have a repeatable way to do it, by hand or with Plumb. Join the waitlist and tell us what your data looks like; we read every reply.

Join the waitlist