Convert JSON to CSV
A tree, flattened into a table you can open anywhere.
- Nested objects flattened
- Arrays kept or split into rows
- Finds the records array
- Nothing uploaded
1.Open the JSON
JSON or JSON Lines. Drag it here, or choose a file.
Or paste JSON instead
Why it exists
JSON is a tree and CSV is a rectangle, so every converter makes choices about nesting, and most make them silently. This makes them visibly: nested objects become dotted columns such as address.city, arrays stay whole in one cell unless you pick one to spread across rows, and the records are found even when they sit inside an API response rather than at the top of the file.
What it does
- Reads a JSON array, a single object, or JSON Lines with one record per line.
- Finds the arrays inside an API response, such as `data` or `results`, and lets you pick which one holds the records.
- Flattens nested objects into dotted column names, in the order the fields first appear.
- Keeps arrays as JSON text in one cell, or gives each item of one array its own row, with the parent's fields repeated.
- Takes a file or pasted JSON, and previews the table before you download.
Records that do not all have the same fields
Real JSON rarely does. Every field that appears in any record becomes a column, and a record without that field gets an empty cell there. Nothing is dropped because the first record happened not to have it.
Questions
- How are nested objects handled?
- Each nested field becomes its own column, named by its path: `{"address": {"city": "Lyon"}}` becomes a column called `address.city`. However deep the nesting goes, it ends up as one level of columns.
- What happens to arrays?
- By default an array stays in a single cell as JSON text, so the number of rows still matches the number of records. Pick an array to split instead and each of its items gets its own row, with the rest of the record repeated beside it.
- My JSON is an object, not an array. Will it work?
- Yes. If the records sit inside a key such as `data` or `items`, the tool lists every array it finds and starts with the largest. A single object with no array becomes a one-row table.
The other tools
- Open a CSV file in your browserDrop a file in. It opens here, and it stays here.Open it
- Run SQL on a CSV fileReal SQL, on your file, without installing a database.Open it
- Merge CSV files into oneSeveral files in, one file out, columns matched by name.Open it
- Remove duplicate rows from a CSVDuplicates on the columns you say identify a row.Open it
- Compare two CSV filesAdded, removed, changed, matched on a key rather than line by line.Open it
- Convert a CSV to PDFA CSV, laid out as a readable table, saved as a PDF.Open it
- Convert a CSV to ExcelA real .xlsx, with nothing in it changed on the way.Open it
- Convert a CSV to JSONEvery row an object, every header a key.Open it
- Convert Excel to CSVEvery sheet of a workbook, out as clean UTF-8 CSV.Open it
- Split a CSV fileOne file too big to use, as several that are not.Open it
- Clean up a messy CSVGermany, germany and “Germany ” become one value again.Open it
- Convert a CSV to SQL INSERT statementsA CSV in, a .sql script any database will run.Open it