How to use Nested JSON to Flat Table
- Paste the JSON document or choose a .json file.
- Point at the array of records, such as data.items, or leave the path empty and let the page pick the array from a top-level array or a single array property.
- Choose how columns are named and how a list inside one record is handled.
- Press Flatten JSON, check the column names, then download the CSV.
Example: Nested JSON to Flat Table
Flatten two orders with a nested address and a list of tags.
Options
- Path to the array of records
- A path such as data.items or data[0].rows names the array to flatten. Left empty, a top-level array is used as it is, an object with exactly one array property uses that array, and any other object is read as a single record.
- One column per list position
- A list becomes tags.0, tags.1 and so on. The longest list in the data decides how many of those columns the whole table gets, and a record that does not reach that many positions keeps empty cells.
- The whole list as JSON text
- A list stays in one cell as its JSON text, which keeps a long list or a list of objects from widening the table.
- Entries joined with a vertical bar
- A list of simple values becomes one cell with the entries joined by a bar. An entry that is itself an object or a list is written as its JSON text so nothing is lost.
Supported inputs and limits
Where your input is processed
This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.
Why a flattened column order is stable
Columns are added in the order the records are met, and a record that arrives later can only add a new column at the end. Two runs over the same document therefore produce the same headings, which matters when the CSV feeds a script or a spreadsheet import.
Questions about Nested JSON to Flat Table
Which array does the page flatten when I leave the path empty?
A top-level array is used as it is. An object whose only array property holds the records uses that property, and anything else is treated as one record, which is why the source line in the report names what it chose.
Why is a column called a.b#2?
Two different places can flatten to the same readable name, such as a key that itself contains a dot and a nested object below it. The later one takes a number suffix so both values survive, and the report names the paths involved.
What happens to a list of objects?
With one column per position, each entry is flattened into its own set of column names. The JSON text and bar-joined settings instead keep the whole list inside a single cell, which suits a long or irregular list.
Is the document sent anywhere?
It is not. The text is parsed in this page, the table is built from the parsed values, and the CSV download is created on your device.