JSON to CSV Converter
Turn a JSON array of objects into a downloadable CSV file: every key becomes a column in order of first appearance, and values are quoted per the CSV rules.
Fill in the values and calculate
The form sends itself back to this page — results print below, computed on the server.
No results yet: fill the form above and press Calculate.
About JSON to CSV Converter
The pasted text is parsed as JSON and every element of the array must be an object. The header row is the union of all keys, ordered by first appearance across the rows: an object that lacks a key leaves that cell empty, and a key that only shows up later adds its column to the right of the existing ones.
Cell values follow the classic CSV quoting rules: a value is wrapped in double quotes only when it contains a comma, a double quote, or a line break, and every embedded double quote is doubled. null becomes an empty cell, numbers and booleans are written as-is, and nested objects and arrays are written as compact JSON so the shape survives in one cell.
The whole conversion is written to a downloadable .csv file with Unix line endings and a trailing newline. The table on the page previews the first 20 rows, while the mono block and the file carry every row, so long arrays still convert in one click.
Questions about JSON to CSV Converter
What happens to nested objects or arrays?
They are written as compact JSON inside one cell, e.g. {"id":7}. Spreadsheets read that cell back as text; flatten deeper structures by hand or split them into separate arrays first.
Why are some values quoted and others not?
Quoting is only needed when a value contains a comma, a double quote, or a line break. Everything else is written bare, which keeps the file readable for diffing and version control.
My rows do not all have the same keys.
That is fine. Columns are the union of every key in first-appearance order, and a row that lacks a key simply gets an empty cell in that column.
Will a spreadsheet mangle my codes?
The file itself keeps every value exactly as the JSON held it, including leading zeros like 007. A spreadsheet can still reinterpret such cells when it opens the file; import it as text to keep codes intact.
What line endings does the file use?
Unix LF, with a trailing newline on the last row. Excel, Numbers, pandas and pgsql all accept LF-separated CSV.
Bookmark and homescreen
- Press Ctrl+B now (or Cmd+B on macOS) to bookmark this page in your browser.
- Drag this link to your bookmarks bar and it will always open this tool: JSON to CSV Converter.
- On a phone: open in Chrome/Safari and use "Add to Home Screen" — the site ships a homescreen icon and manifest, so it installs like an app.
- Two addresses work:
https://useful-utilities.com/json-to-csv-converter/andjson-to-csv-converter.useful-utilities.com. Copy whichever you prefer.