{ } JSON Workbench100% Private • Zero Server Uploads

"JSONL to CSV":{ }

Convert JSON Lines (JSONL / NDJSON) to CSV: every line becomes a row, nested objects become dotted columns, and records with different keys share one header. Download the CSV for Excel or Google Sheets. Runs 100% in your browser: nothing is uploaded.

Want to inspect the records first, or find broken lines? Open the file in the JSONL viewer. Converting a regular JSON array instead? Use JSON to CSV.

What is a JSONL to CSV converter?

JSON Lines files (also called NDJSON) store one JSON record per line: logs, event streams, LLM datasets, and exports from BigQuery or MongoDB. CSV is what spreadsheets and BI tools expect. This converter turns each line into a row, flattens nested fields into columns, and builds one header from every key it sees, so uneven records still line up. Read more about the format in JSONL vs JSON.

How to use

  1. Paste JSON Lines (one JSON object per line) or open a .jsonl / .ndjson file.
  2. The CSV appears instantly: one row per line, one column per key.
  3. Nested objects become parent.child columns, lists of values are joined into one cell, and records with different keys share a single header.
  4. Copy the CSV or download data.csv and open it in Excel, Google Sheets, or any data tool.

Examples

JSON Lines → CSV

Input
{"id": 1, "event": "signup", "user": {"name": "Ada"}}
{"id": 2, "event": "purchase", "user": {"name": "Linus"}, "amount": 59.9}
Output
id,event,user.name,amount
1,signup,Ada,
2,purchase,Linus,59.9

FAQ

How do I convert JSONL to CSV?

Paste the JSON Lines or open the .jsonl file above and the CSV appears immediately; download it as data.csv. In Python the equivalent is pd.read_json("data.jsonl", lines=True).to_csv("data.csv", index=False), though pandas keeps nested objects as dicts unless you normalize them first.

What happens to nested objects and arrays?

Nested objects are flattened into dotted columns like user.name. Lists of plain values are joined into one cell (a, b), and lists of objects are kept as compact JSON in the cell, so no data is lost.

What if lines have different keys?

The CSV header is the union of every key in every line, in first-seen order. A line that lacks a key gets an empty cell in that column.

What if a line is invalid?

The conversion stops and tells you the exact line number, so you can fix the source instead of getting a CSV with rows silently missing. Use View JSONL to list every bad line at once.

Is my file uploaded?

No. Parsing and conversion run in your browser; the CSV is generated and downloaded locally. Nothing is uploaded.

Related tools