JSON to CSV Converter

Paste a JSON array of objects and get CSV back. Nested objects flatten with dot notation, inner arrays join or expand into indexed columns, missing keys become empty cells, and the header is the union of every key across every row. Runs in your browser — nothing is uploaded.

JSON input



      
    

How nested JSON maps to a flat CSV

CSV is a grid: one header row, then one row per record, with the same columns in every row. JSON is a tree. To bridge the two, every branch of the tree is turned into a single column whose name is the path to that leaf, joined with dots:

{ "name": "Alice", "address": { "city": "Berlin", "zip": "10115" } }

name , address.city , address.zip
Alice, Berlin       , 10115

The flattening rules this tool uses:

The RFC 4180 quoting rules

RFC 4180 is the closest thing CSV has to a standard. A field must be wrapped in double quotes when it contains any of:

A field with none of those may be written bare. Quote every field mode wraps all of them regardless — slightly larger, but some brittle parsers are happier with it. Records are separated by CRLF in the spec; keep CRLF unless you know the consumer wants Unix line endings.

Arrays of arrays vs arrays of objects

Input shapeExampleWhat you get
Array of objects[{"a":1,"b":2},{"a":3,"b":4}]The normal case. Keys become the header; one row per object.
Array of arrays[["a","b"],[1,2],[3,4]]Positional columns col1, col2, ...; each inner array is a row. If the first row looks like headers, you may want a CSV that keeps it as data — check the output.
Array of scalars["x","y","z"]A single column named value, one value per row.
Single object{"a":1,"b":2}Treated as a one-row table.
A bare string, number, or boolean42Rejected with a message — there is no table to build.

Excel gotchas

Questions

How does a nested object become CSV columns?

Each nested path becomes one dot-named column: {"address":{"city":"Berlin"}} gives address.city. The header is the union of all leaf paths across every row.

What happens to arrays inside an object?

Your choice: join puts the array in one cell separated by ;, indexed columns makes roles[0], roles[1] and keeps flattening object elements.

What about objects missing keys others have?

The header is the union of all keys, so the column exists and rows without that key get an empty cell.

How do I stop Excel mangling ZIP codes and dates?

Import through Data → From Text/CSV and set those columns to Text, or open the file in Google Sheets. CSV itself cannot mark a field as text.

Is my JSON uploaded?

No. Parsing, conversion, and the download all happen in your browser.