JSON to CSV Converter
Flatten an array of JSON objects into a clean, quoted CSV table — nested fields get expanded into columns and primitive arrays collapse into a single cell, so the output opens straight in Excel or Sheets.
Turning hierarchical JSON into a flat table
CSV is a flat grid: rows and columns, nothing nested. JSON is a tree. This converter bridges that gap by flattening each object — a field like address.city becomes a column named address_city, and the whole array of objects becomes the rows of your table.
Every record is flattened independently, then the tool takes the union of all keys it found and sorts them into a stable, alphabetised header row. That means objects with different shapes still line up: a missing field simply yields an empty cell rather than a misaligned row.
Each value is wrapped in double quotes and any embedded quotes are doubled, so commas, line breaks and quote marks inside your data won't break the columns. Primitive arrays such as ["a", "b"] are joined with semicolons into a single cell so they stay readable.
From JSON to a CSV file
- 1
Provide an array of objects
Paste a JSON array (a single object works too — it's treated as a one-row table).
- 2
Watch the table build
Headers are computed from every object and the rows fill in on the right as you type.
- 3
Download for your spreadsheet
Grab the .csv file and open it in Excel, Google Sheets, or import it into a database.
Why flatten to CSV
Hand data to non-developers
Analysts and stakeholders live in spreadsheets. CSV lets them work with your API data without touching code.
Bulk-load databases
Most databases and warehouses ingest CSV directly, making it a quick path from a JSON export to a populated table.
Predictable columns
Because headers are unioned and sorted, every row has the same columns even when the source objects differ.
Safe with messy text
Quoting and escaping mean commas, newlines, and quotes inside values never spill into the next column.
A worked example
An array with a nested object and a primitive array becomes a flat, quoted table.
[
{ "id": 1, "name": "Ada", "skills": ["Go", "Rust"] },
{ "id": 2, "name": "Linus" }
]"id","name","skills"
"1","Ada","Go;Rust"
"2","Linus",""How nesting is handled
- Nested objects are flattened with an underscore-joined path:
{"user":{"id":1}}becomes a columnuser_id. - Arrays of primitives are joined into one cell with semicolons, keeping the table one row per record.
- Arrays of objects are expanded by index, producing indexed column groups like
items_1_name. - Headers are collected across the whole array and sorted, so inconsistent records still align column-for-column.
Frequently asked questions
They're flattened into columns using an underscore path. A field at user.address.city becomes a column called user_address_city, so no nesting is lost — it just moves into the header name.
An array of simple values like tags is joined into one cell with semicolons. An array of objects is expanded by index into separate indexed columns so each sub-field gets its own column.
Quoting every field is the safest approach: it guarantees that values containing commas, quotes, or line breaks stay inside their own cell. Embedded quotes are escaped by doubling them.
That's fine. The tool collects the union of all keys and sorts them. Rows missing a particular field just get an empty quoted cell, so the columns never drift out of alignment.
Yes. A lone object is automatically treated as a one-row table, so you don't have to wrap it in an array yourself.
Yes. The output is standard comma-separated, quote-escaped CSV that Excel, Google Sheets, and database import tools all understand.
Need another tool?
Browse the full toolbox or dig into the blog for the engineering behind it.