JSON to CSV Converter
Turn a JSON array of objects into a CSV table, entirely in your browser.
Runs entirely in your browser. Nothing is uploaded, logged or stored.
Paste an API response and get a table you can open in a spreadsheet. Every key that appears anywhere in the array becomes a column, and it happens in your browser, so a payload full of personal data never leaves your machine.
How it works
The document has to be an array of objects, because that is what a table is: one object per row. A single object on its own is accepted as a one-row table. Anything else — a bare number, a string, an array of strings — has no rows and is reported rather than guessed at.
The header is the union of every key in the array, in the order each was first seen, not simply the keys of the first object. An optional field missing from the first record is exactly the shape a real API response has, and taking only the first row's keys would drop that column for every row.
A nested object or array is written into its cell as JSON rather than spread across extra columns. Flattening looks tidier and does not survive the return trip: two records nested differently would produce different column sets, and a key that itself contains a dot becomes indistinguishable from a nested one.
Null becomes an empty cell, true and false become the words true and false, and numbers are written as JSON would write them, so a value does not change shape on the way out.
Examples
| Case | Input | Result |
|---|---|---|
| A key missing from the first record still gets a column | [{"id": 1}, {"id": 2, "note": "late"}] | id,note 1, 2,late |
Frequently asked questions
Why is my nested object shown as JSON in one cell?
Because flattening it would not be reversible. If one record nests three levels and the next nests one, flattening produces two different sets of columns from the same array; and a key that already contains a dot becomes impossible to tell apart from a nested path. Keeping the structure in the cell means converting back gives you what you started with.
Will Excel open this correctly?
It depends on your locale more than on the file. A spreadsheet in a locale that writes decimals with a comma expects the semicolon as the separator, which is why it is in the delimiter list. If a comma-separated file opens as one column per row, that is the reason.
My array is nested inside an object. Why does it fail?
Because the document as a whole is not a list of rows. An API response of the form {"data": [...]} needs the array itself pasted in, not the wrapper. The wrapper has exactly one row — itself — and converting it would produce a table with one cell containing everything.
Is my document uploaded anywhere?
No. The page loads a small script that converts locally. You can disconnect from the network after the page has loaded and the tool keeps working.
Good to know
- Everything happens in your browser. The document is not uploaded, not logged and not stored.
- Quoting follows RFC 4180: a field is quoted when it contains the delimiter, a double quote or a line break, and a double quote inside a quoted field is written twice. Backslashes are ordinary characters and are never treated as escapes.