Boneyard Tools

JSONL to CSV Converter

Paste JSONL (one JSON object per line) to convert it to CSV, or switch direction to turn CSV back into JSONL. The header is the union of all keys.

How to convert JSONL to CSV

  1. Paste your JSONL, with one JSON object per line.
  2. Keep the default direction to get CSV, or switch to go back to JSONL.
  3. Copy the converted output.

Examples

Two records

{"name":"Ada","city":"London"}
{"name":"Alan","city":"Bletchley"}
name,city
Ada,London
Alan,Bletchley

Frequently asked questions

What is JSONL?

JSONL, also called NDJSON or JSON Lines, stores one JSON object per line. It is common for logs, exports and streaming data.

How is the CSV header built?

The header is the union of every key across all lines, kept in the order each key is first seen. Missing keys become empty cells.

How are commas and quotes handled?

Values containing commas, quotes or newlines are wrapped in double quotes and any inner quotes are doubled, following RFC 4180.

What happens to nested objects or arrays?

Nested values are written into a single cell as compact JSON, so an array like x and y becomes a JSON string in that column.

Can I convert CSV back to JSONL?

Yes. Switch the direction and the first CSV row becomes the keys, producing one JSON object per data row. Cells come back as strings.

Related tools