Convert JSON to CSV
Turn a JSON array of objects into a CSV table, taking the columns from every object rather than only the first.
Runs entirely in your browser — nothing is uploaded
2
Rows
2
Columns
id,name 1,Ana 2,Bob
Columns come from every object, not the first
This is where hand-rolled versions of this conversion go wrong. If the first object has three keys and the fifth has a fourth, taking the columns from object one silently drops that field for the entire file.
Here the columns are the union of every key seen, in the order they first appear. A row missing a field gets an empty cell rather than losing the column.
CSV is flat and JSON is not
A CSV is a rectangle. JSON is a tree, and there is no honest way to put a nested object or an array into a single cell.
Nested values are written as JSON inside the cell rather than flattened into invented column names or quietly discarded. It is not beautiful, but it is lossless and it is obvious — both better than the alternatives.
It has to be an array of objects
CSV is a table, so the JSON needs rows. A single object has no rows, a bare number has no rows, and an array of arrays has no column names.
Anything else is refused with a reason rather than converted into something misleading. If you have a single object, wrap it in square brackets to make it a one-row table.
Nothing is sent anywhere
Everything on this page happens in your own browser. No request is made, nothing is stored between visits, and the page keeps working with the connection switched off.
Frequently asked questions
Will this open in Excel?
Yes. Save the result as .csv and Excel will open it. If your locale uses semicolons as the field separator, choose that option — otherwise Excel puts the whole row in one column.
How are commas inside values handled?
The value is wrapped in quotes, and any quotes inside it are doubled, which is the CSV standard. Values with line breaks or leading spaces are quoted for the same reason.
What happens to nested objects?
They are written as JSON text inside the cell. Flattening them into extra columns is possible but guesses at names, and dropping them loses data without saying so.
Is my data sent anywhere?
No. Everything happens in this tab and nothing is transmitted or stored.