JSON Lines (JSONL) to CSV converter

Paste JSONL or NDJSON records and get a CSV table to open in Excel or Google Sheets.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter json lines records and output csv delimiter.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

Each non-empty line is read with JSON.parse and must be an object. Columns are all keys in order of first appearance. null becomes an empty cell, nested objects and arrays are written as JSON text, and the table is written with RFC 4180 rules.

Example

Inputs: Output CSV delimiter = Comma ,. Result: CSV: product,price,tags,stock Tea,12.5,"[""hot""]", Coffee,18,,; Records: 2; Columns: 4.

{"product":"Tea","price":12.5,"tags":["hot"]}
{"product":"Coffee","price":18,"stock":null}
product,price,tags,stock
Tea,12.5,"[""hot""]",
Coffee,18,,

Limits and caveats

  • Nested objects are not flattened into separate columns; they are written as JSON text in one cell.
  • A regular JSON array [ ] is not JSONL; put one object per line first.

Questions about this tool

What if records have different keys?

All keys become columns, and a record missing a key gets an empty cell.

Are blank lines ignored?

Yes. Blank lines are not counted as records and cause no error.

How do I find an error in the file?

The message gives the number of the first line that is not a valid JSON object.