NDJSON to CSV Converter
Convert NDJSON, one JSON object per line, into a CSV table. Each line becomes a row, the headers are the union of every record's keys in first-seen order, nested fields flatten into dot and bracket columns, and a malformed line is reported with its line number. Blank lines are skipped.
Worked example
{"id":1,"level":"info"}
{"id":2,"level":"error","code":500}becomes
id,level,code 1,info, 2,error,500
The second record introduces a code key, so a code column is appended and the first row's cell stays empty. Missing keys become empty cells, not the word null.
Frequently asked questions
What is NDJSON?
Newline-delimited JSON, also called JSON Lines: one complete JSON value per line, with no surrounding array or commas between records. Log pipelines, bulk APIs, and export jobs use it because each line can be parsed and processed on its own.
What happens if one line is not valid JSON?
The conversion stops with an error like "Line 3: Unexpected token", pointing at the failing physical line so you can fix or delete it. Blank lines do not count as errors; they are skipped.