JSON Lines → CSV
Convert JSONL (NDJSON) file to CSV, deriving headers from the union of all observed object keys.
CSV:
—
From JSON Lines to a spreadsheet
JSONL, also called NDJSON, is the format with one JSON object per line. It is the standard output of structured logging, of batch database exports and of training datasets, precisely because it can be processed line by line without loading the whole file into memory. The trouble starts when you want to look at that data: nobody analyses ten thousand lines of JSON by eye.
Paste the lines and the page builds the table. It walks every object, collects the set of keys in the order each first appeared and uses that as the header. Objects missing a key get an empty cell in that column, so records with different shapes coexist in the same table. Commas, quotes and line breaks inside a value are escaped the way CSV requires, with doubled quotes.
Two things to know before trusting the output. A line that is not valid JSON is skipped silently — if the record count does not match what you expected, that is where the difference lives. And nested values, such as an object or a list inside a field, go through the default text conversion, which turns an object into [object Object]. For nested data, flatten the keys before pasting.
Frequently asked questions
What determines the column order?
Why did Excel put everything in one column?
Does it work for ordinary JSON, a single array?
Related Tools
CSV → JSON Lines
Convert CSV to JSONL (one JSON object per line). Common format in logs, ML pipelines and document databases.
Fixed-Width ↔ CSV/JSON Converter
Converts fixed-width text files to CSV, TSV or JSON and back, with automatic column detection, a position map and per-line warnings.
YAML to NDJSON Converter
Explains how to represent YAML lists as NDJSON (one JSON object per line) with practical examples.
CSV to JSON
Convert CSV to JSON. The first row becomes object keys, the rest become array items. Supports separators , ; and \t. Auto-detects numbers and booleans. Everything in your browser.
CSV ↔ NDJSON
Two-way conversion between CSV and NDJSON (Newline Delimited JSON), preserving numeric types when detected.
JSONP to JSON Converter
Strips the callback wrapper of a JSONP response leaving only the JSON contained inside the parentheses.