How does JSON become CSV?
JSON and CSV describe data in incompatible shapes. JSON is a tree: an object can contain another object, and different objects in the same array can carry different fields. CSV is a rectangle: one fixed set of columns, one row per record, no nesting. Converting the first into the second means deciding what to do where the shapes disagree.
This converter takes the union of every key across every object, so a field that appears in only the last record still gets a column instead of being silently dropped. Nested objects become dotted columns — user.contact.email — and arrays are written as JSON inside a single cell, because flattening them would give each row a different number of columns and the result would no longer be a table.
Each line should contain the same number of fields throughout the file.
Features
- Every field survives
- Columns come from the union of all objects, not from the first one. A converter that reads only the first record silently loses any field that appears later — the kind of data loss nobody notices until the spreadsheet is already in use.
- Nested objects become dotted columns
- user.contact.email is a column of its own, so the structure survives in a form a spreadsheet can sort and filter. Switch the mode to keep nested objects as JSON in one cell instead.
- Arrays are kept whole, deliberately
- An array is written as JSON in a single cell rather than spread across columns, because array lengths vary per row and the file would stop being rectangular. The columns this affected are listed above the output.
- RFC 4180 quoting
- Values containing the delimiter, a quote, or a line break are quoted, and embedded quotes are doubled — so a name like "Doe, Jane" survives the round trip into Excel.
- Delimiter choice
- Comma, semicolon, tab, or pipe. Semicolon is what Excel expects on locales where the comma is the decimal separator, which includes Korean, German, and French systems.
How to use
- 1
Paste the JSON
Paste an array of objects. A single object is accepted too and becomes one row.
- 2
Choose how nesting is handled
Flatten turns nested objects into dotted columns; the other mode keeps each nested object as JSON in one cell.
- 3
Pick the delimiter
Comma for most tools, semicolon if the file will be opened in Excel on a locale that uses the comma as a decimal separator.
- 4
Copy the CSV
Copy the result and paste it into a spreadsheet or save it as a .csv file.
Frequently asked questions
How do I convert nested JSON to CSV?
Nested objects are flattened into dotted column names by default — an object at user.contact with an email field becomes a column called user.contact.email. This keeps every leaf value addressable in a spreadsheet. If you would rather keep the structure intact, switch the nesting mode and each nested object is written as JSON inside a single cell.
What happens to arrays inside my JSON?
They are written as JSON text in one cell. Spreading an array across columns is possible only if every row has the same number of elements, which is rarely true, and the moment it is not the file stops being a rectangle. Keeping the array whole is lossless; spreading it is not.
Why does my CSV have empty cells?
Because that object did not have that field. JSON allows every object in an array to carry a different set of keys; CSV does not, so a record missing a field gets an empty cell in that column. This is the correct translation — the alternative would be dropping the column entirely and losing the data that other rows do have.
Will this open correctly in Excel?
Choose the semicolon delimiter if your system locale uses the comma as a decimal separator — Korean, German, and French Windows installations do, and Excel there expects semicolons. With a comma-delimited file on such a system, every row lands in a single column.
Is my JSON uploaded?
No. The conversion runs in JavaScript on your own device and this page has no backend, so an API response containing customer data can be converted without leaving your machine.
What is the difference between this and a CSV viewer?
This page converts in one direction: JSON in, CSV out. The CSV viewer reads a CSV file, guesses its delimiter, and shows it as a table — the opposite direction. Both run entirely in the browser.
If you hit this
Specifications this follows
- RFC 4180 — Common Format and MIME Type for CSV Files — The quoting rules used here, and the fixed-column requirement that forces arrays into a single cell.
- RFC 8259 §4 — JSON Objects — Why two objects in the same array may legitimately carry different members.
- W3C — Model for Tabular Data and Metadata on the Web — What is lost when a tree is written as a table.
Related tools
- JSON ViewerValidate, format, and explore JSON as a tree or a table. Large API responses stay foldable.
- CSV Viewer & ConverterOpen delimited data as a table, guess the delimiter, and convert it to JSON.
- YAML ↔ JSON ConverterConvert YAML to JSON and back, with the parser's own error position when it will not parse.