jsonnorm / JSONL / NDJSON to CSV

Technical guide · line-delimited records

JSONL to CSV with late fields kept.

JSON Lines looks like a sequence of identical objects until record 1,000,000 adds a field. A first-record header is not a schema; fields appearing in later records are still included.

The difficult example: a field appears after a blank line

Blank lines should not become records, and a field introduced later must still get a column. The union schema below discovers payload.amount and trace even though neither exists on the first record.

Input JSONL

{"id":1,"payload":{"kind":"pageview"}}

{"id":2,"payload":{"kind":"purchase","amount":19.95},"trace":"t-9"}

Resulting CSV

id,payload.kind,payload.amount,trace
1,pageview,,
2,purchase,19.95,t-9

Preview caveat: when the browser preview samples a large stream, it is labeled provisional. The complete conversion uses the field option you selected and reports malformed input instead of silently skipping a line.

Operational details that matter

  • Union across records: late keys are columns, with empty cells only where a record truly has no value.
  • Numbers stay exact: identifiers and exponent notation remain as written.
  • Malformed input: invalid JSON is reported instead of silently skipped.

Upload a JSONL or NDJSON file and inspect its union schema.

Open the JSON converterOpen in examples