Convert JSONL to CSV
Turn JSONL files into CSV. A list of objects becomes one row per object under a header of every key in first-seen order, and a single object becomes one row.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop JSONL files on the dialor turn it to pick what to do
A table from your JSON Lines.Each object becomes a row. Every key becomes a column.
What you get
A CSV file with one row per object. The header lists every key found in the file, in the order each key first appears.
A file holding a single object gives a CSV with one row.
Nested values and nulls
Nested objects and lists are written into their cell as JSON text, so the cell holds the structure as text instead of spreading it over more columns.
A null value leaves its cell empty.
When it stops
If the file cannot be parsed, the conversion stops with
input_corrupted. The result is one CSV file.To go the other way, use CSV to JSONL. To join several files first, see merge JSONL.
JSONL and CSV.What each format is.
The formats
JSON Lines
JSON Lines, one JSON object per line, the format of logs and datasets.
- Extensions
- .jsonl .ndjson
- MIME type
- application
/jsonl - Kind
- Text and data
CSV
Rows of comma-separated values. The plainest way to move a table between programs.
- Extensions
- .csv
- MIME type
- text
/csv - Kind
- Text and data
In your code.The same JSONL to CSV conversion through the API, for your app or your agent.
$ cv convert report.jsonl report.csv$ cv convert report.jsonl report.csvQuestions.What people ask about JSONL to CSV.
The header holds every key from all the objects, in first-seen order. A key that appears only in later objects still gets a column.
They are written into their cell as JSON text. They are not split into separate columns.
The cell is left empty.
Yes. A single object becomes one row under its header.