Nested JSON to Flat Table

Flatten nested JSON into a CSV table with one row per record and a column for every field it finds.

Files stay on your device No sign-up Free to use
How this works

The tool runs in this browser. Your file or text is not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.

Privacy details

Flatten JSON controls

Drop your file here

or choose one from your device

One UTF-8 .json file up to 8 MB. Use either this or the pasted text, not both.

    Paste the JSON document, or leave this empty and choose a file. The document is read in your browser.

    For example data.items or data[0].rows. Leave empty and a top-level array is used; a single object whose only array property holds the records uses that array, and any other object is read as one record.

    One column per position is the default. The other two keep a long list, or a list of objects, inside a single cell so the table does not grow sideways.

    A value or heading whose first visible character is = + - or @ receives an apostrophe, so a spreadsheet reads it as text. The prefix changes the stored value.

    How to use Nested JSON to Flat Table

    1. Paste the JSON document or choose a .json file.
    2. 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.
    3. Choose how columns are named and how a list inside one record is handled.
    4. 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.

    You add
    JSON: {"data":{"items":[{"id":1,"name":"Ana","address":{"city":"Bristol","zip":"BS1"},"tags":["a","b"]},{"id":2,"name":"Lee","address":{"city":"Leeds"},"tags":[]}]}}. Record path: data.items. Column names: Dotted paths. Lists: One column per list position. Formula protection: on.
    You get
    The page reports two records in six columns: id, name, address.city, address.zip, tags.0 and tags.1. The download holds those headings, then 1,Ana,Bristol,BS1,a,b and 2,Lee,Leeds,,,

    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

    Paste up to 8,000,000 characters and 8 MB of UTF-8 text, or choose one UTF-8 .json file up to 8 MB, holding at most 50,000 records. The table is capped at 500 columns and about 2,000,000 cells, and a column is refused as soon as that count is passed. Nesting deeper than 32 levels and a cell longer than 20,000 characters are refused with the path that caused it. A key named __proto__, constructor or prototype is renamed before it becomes a column name, and two different paths that flatten to the same name receive a number suffix rather than replacing each other.

    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.

    Project manager: Tony Hines · Content updated 4 October 2026 · Report a problem