Paste a JSON array and convert it to CSV online, with nested objects flattened into columns.
Paste JSON, upload a .json file or drop one here.
Updates as you type. Copy it or download data.csv.
Converting…
This free JSON to CSV converter turns a JSON array of objects into a table you can open in Excel, Google Sheets or Numbers, or load into a database. Paste an API response or a database export, and the CSV appears as you type: one row per object, one column per key. There is nothing to install and no sign-up, and because the conversion runs in your browser, your JSON is never uploaded.
Real JSON is rarely flat, so the converter handles the messy parts. It flattens nested objects into columns, fills gaps when objects have different keys, and quotes every field that contains a comma, a double quote or a line break. You can paste a bare array, a single object, or a response wrapped in {"data": [...]}, and it finds the rows for you.
.json file. You can also drag a file onto the editor.data.csv. Tick UTF-8 BOM for Excel first if the file has accented or non-Latin characters and will be opened in Excel.The second record has no bio and the first has no active, so both columns exist but some cells are empty. The nested address object becomes two columns, the roles arrays stay in one cell each, and the quotes inside the bio are doubled, which is how CSV escapes them.
[
{
"id": 1,
"name": "Ada Lovelace",
"address": { "city": "London", "country": "UK" },
"roles": ["admin", "editor"],
"bio": "Wrote the first \"program\", in 1843."
},
{
"id": 2,
"name": "Zoë Müller",
"address": { "city": "Zürich", "country": "CH" },
"roles": ["viewer"],
"active": true
}
]id,name,address.city,address.country,roles,bio,active 1,Ada Lovelace,London,UK,"[""admin"",""editor""]","Wrote the first ""program"", in 1843.", 2,Zoë Müller,Zürich,CH,"[""viewer""]",,true
| JSON | CSV result | Notes |
|---|---|---|
| Array of objects | One row per object | Column order follows the first time each key appears. |
| Single object | One row | Wrap it in [ ] to keep it as one row even if it contains arrays of objects. |
| Nested object | Columns like address.city | With flattening off, the object is written as JSON text in one cell. |
| Array | JSON text in one cell | For example ["a","b"], whatever the array contains. |
null | Empty cell | A missing key also gives an empty cell. |
| Number, true, false | Written as text | Numbers use JavaScript formatting, so 1.50 becomes 1.5. |
| String | Unchanged | Quoted only if it contains the delimiter, a double quote or a line break, or has leading or trailing spaces. |
CSV has no nesting, so nested JSON has to be spread across columns or squeezed into one cell. With Flatten nested objects on, every level joins its parent key with a dot: {"address": {"geo": {"lat": 59.9}}} becomes a column named address.geo.lat. Turn it off and the whole address object is written as a JSON string instead, which is useful when another system will parse that cell again.
Arrays are never expanded, because there is no single right answer: one row per element, or one column per index. Instead each array is written as compact JSON text such as ["admin","editor"]. That is lossless and consistent for arrays of strings, numbers and objects alike. If you want one row per element, for example one row per order, paste the array of orders itself.
A top-level array is the table. If you paste an object, the converter searches it depth first, in key order, for the first non-empty array that contains only objects, and uses that one. So {"meta": {...}, "data": {"users": [...]}} converts the users, and the meta fields are left out. An object with no such array becomes a single row. A JSON array of plain values, like ["a", "b"], becomes a single value column.
The output follows the usual CSV rules. A field containing the delimiter, a double quote or a line break is wrapped in double quotes, and any double quote inside it is doubled. Line breaks inside values are kept, so a multi-line string stays one cell. Rows end with a line feed, which Excel, Google Sheets and any CSV parser accept. If a value contains a semicolon, it is quoted when the semicolon delimiter is selected and left alone otherwise.
CSV is plain text with no data types. After conversion, the number 7, the string "7" and the boolean true are just characters in a cell, and an empty cell can mean null, an empty string or a key that was never there. If you need to tell those apart later, keep the original JSON, or turn flattening off and parse the JSON text in those cells downstream. Numbers beyond JavaScript's safe integer range (about 9 quadrillion) are rounded when the JSON is parsed, so write very large IDs as strings in the source.
Two things trip people up. First, the delimiter: in locales where the comma is the decimal mark, Excel treats the semicolon as the list separator, so a comma-separated file opens as one long column. Pick Semicolon for those regions. Second, the encoding: the CSV is UTF-8, but Excel does not reliably detect that on double-click, so characters like ü or é can come out garbled. Either tick UTF-8 BOM for Excel (it adds a byte order mark to the downloaded file only) or import with Data > From Text/CSV and choose UTF-8. Skip the BOM when the file is going to a script or database loader, since some parsers read the mark as part of the first column name.
Excel also guesses types on import. Values such as 00123 lose their leading zeros and very long numbers turn into scientific notation. The CSV itself is correct; to keep the text, import through Data > From Text/CSV and set those columns to Text. If you would rather skip CSV, the JSON to Excel converter writes a real .xlsx file.
The same steps work for a plain JSON array to CSV conversion and for a messy one. Records with different keys, missing fields and mixed nesting all end up in one table, so you can compare them side by side before deciding which columns you actually need. Because everything happens as you type, it is easy to experiment: switch the delimiter, toggle flattening and watch the header row change.
Need test data first? Create realistic records with the JSON Generator and convert them here. To go the other way, use the CSV to JSON converter. If you want typed tables rather than a file, try JSON to SQL to generate a CREATE TABLE statement and INSERT rows, or JSON to HTML table for a table you can paste into a page. And when you are not sure what shape your data has, the JSON Schema Generator shows its structure.
Paste your JSON into the JSON Input editor, or upload a .json file. The CSV appears in the output editor as you type. Copy it, or click Download to save it as data.csv and open it in Excel or Google Sheets.
Leave Flatten nested objects ticked. Each nested object becomes dot-notation columns such as address.city, however deep it goes. Arrays are written into a single cell as JSON text, for example ["admin","editor"].
Yes. A single object becomes one row. If the object contains an array of objects, such as {"data":{"users":[...]}}, the converter uses the first one it finds as the table. To force an object to be a single row anyway, wrap it in square brackets.
In regions where the decimal separator is a comma, such as Germany, France and the Netherlands, Excel expects a semicolon between fields. Choose Semicolon in the Delimiter option and download again. You can also use Excel's Data > From Text/CSV import and pick the delimiter there.
The file is UTF-8, and Excel does not always detect that when you double-click a CSV. Tick UTF-8 BOM for Excel before downloading, or import it with Data > From Text/CSV and select UTF-8 as the file origin.
Yes. Use the CSV to JSON converter, or click Swap direction above the editors. Nested objects you flattened will come back as flat keys such as address.city, because CSV has no way to mark nesting.
No. The conversion runs entirely in your browser with JavaScript, so your data never leaves your device. That makes it safe for exports that contain customer or internal data.