Flatten Nested JSON to a Flat Object or CSV

Paste nested JSON, or drop a .json file, and download it flattened to dot-notation keys (or your own delimiter), as JSON or CSV. Nothing is sent anywhere.

Flatten Nested JSON to a Flat Object or CSV

Drop your JSON file here

Up to 20MB per file. Stays on this device.

Nothing is sent anywhere. Turn off your Wi-Fi and this page still works - try it.

How it works

  1. Drop or choose a .json file, or paste JSON directly into the text box.
  2. Pick a delimiter for the flattened keys (dot, underscore, or slash), and choose whether array items get their own numbered key. The result updates immediately.
  3. Review the flattened result: a table for an array of records, a key/value list for a single object. Then download it as JSON or CSV.
Example output

Input

[
  { "order": "A1", "customer": { "name": "Priya", "city": "Austin" } },
  { "order": "A2", "customer": { "name": "Omar", "city": "Reno" } }
]

Output

[
  {
    "order": "A1",
    "customer.name": "Priya",
    "customer.city": "Austin"
  },
  {
    "order": "A2",
    "customer.name": "Omar",
    "customer.city": "Reno"
  }
]

Nested objects become dot-notation keys (customer.name) so every record is one flat level deep.

Frequently asked questions

Is my JSON sent anywhere?

No. Pasted JSON and uploaded files are both read entirely on your device: nothing is sent to a server. Turn off your Wi-Fi after the page loads and it still works. This page loads 11KB of JavaScript, gzipped - about what your browser's network tab will show for this page's own scripts.

How are nested objects turned into flat keys?

Each level of nesting is joined with your chosen delimiter. With the default dot delimiter, {"user":{"name":"Ada"}} flattens to a single key user.name with value Ada. Choose underscore or slash instead if that suits your spreadsheet or downstream tool better.

What happens to arrays?

By default each array item gets its own numbered key, so {"roles":["admin","editor"]} becomes roles.0 and roles.1. Turn off “give array items their own numbered key” to keep each array as a single JSON value instead. That’s useful when an array is really one piece of data (like a list of tags) rather than something you want spread across columns.

Can I flatten a list of records at once, not just one object?

Yes. If the top level of your JSON is an array where every item is an object (a typical API response or export), each item becomes one row of a table, with every field it contains as a column. Download that as CSV to open it straight in a spreadsheet, or as JSON to get the same flattened records back as an array.

What if two records in my array have different fields?

Every field seen across any record becomes a column; a record that doesn’t have a given field just gets an empty cell there, the same way a missing or null value is shown.

Files are processed locally in your browser and never uploaded. Read more on the privacy page.