JSON to CSV — Flatten Arrays of Objects into a Table for Excel
Flatten JSON object arrays with consistent CSV header quoting for Excel.
- The columns are all keys in the order they appear; nested objects become a.b columns, arrays are written as JSON text and null becomes an empty cell. Fields holding the delimiter, a quote or a line break are quoted, as Python's csv.writer does.
When to use the JSON Array of Objects to CSV Flattener
Every key becomes a column
The columns are the keys of all objects in the order they appear, so an object without a key still gets an empty cell in the right column. The column order is stable, so the same data always gives an identical file.
Nested objects flattened
Objects inside objects become columns such as site.city, arrays are written as JSON text and null becomes an empty cell. Flattening can be turned off to keep objects as JSON text.
Quoting like csv.writer
Fields holding the delimiter, a quote or a line break are quoted. The result is tested to be identical, character by character, to Python's csv.writer.
Ready for Excel
Choose CRLF line endings as RFC 4180 says, add a UTF-8 BOM so Excel reads accented letters correctly, and pick semicolons for Indonesian Excel.
Frequently asked questions
What about arrays of arrays?
Each inner array becomes one line as it is, without an automatic title line.
Are big numbers rounded?
No. Numbers are written exactly as in the JSON, including integers beyond 2^53.
How are the columns ordered?
Columns follow the order in which keys appear: the keys of the first object come first, and new keys from later objects are added on the right.
What about a single object?
A single object becomes one data line below its title line.
Is my data uploaded?
No. The conversion runs in your browser.
Similar tools
- CSV Spreadsheet Data to JSON Array ConverterParse quoted RFC 4180 CSV columns into typed JSON arrays instantly.
- JSON Formatter & Syntax PrettifierFormat messy single-line JSON with 2/4-space indentation and sorted keys.
- JSON Minifier & Whitespace CompressorStrip whitespace and newlines from JSON payloads and compare byte savings.
- RFC 8259 JSON Syntax Validator & DebuggerPinpoint trailing commas, unquoted keys & syntax errors with line/column clues.