NDJSON to CSV Converter

Paste or drop an NDJSON file (one flat JSON object per line, sometimes called JSON Lines or JSONL) to convert it into a CSV spreadsheet, or paste CSV to turn it back into NDJSON. The CSV header is built from the union of every key that appears across all lines. CSV values are only converted to numbers or booleans when an entire column parses cleanly as one; everything else stays a plain string. It runs on your device, and nothing is uploaded.

PrivateFreeWorks offline

Reviewed by Vincenzo Manto, Founder & Lead Developer · Last updated September 27, 2026

How it works

  1. 1

    Paste your NDJSON (one JSON object per line) or a CSV file into the input box.

  2. 2

    Choose the conversion direction and the delimiter your CSV uses.

  3. 3

    The converted output appears instantly on the right.

  4. 4

    Copy it or download it as a .csv or .ndjson file.

Why convert between NDJSON and CSV?

NDJSON suits log streams, event pipelines, and many analytics exports because each line can be appended and parsed independently. CSV is what spreadsheets, BI tools, and most non-technical stakeholders expect instead. This tool converts between the two without writing a script.

Whole-column type inference

Guessing types cell by cell can silently turn a phone number or a zip code into a number, so this tool only infers a numeric or boolean type when every value in an entire CSV column agrees. That keeps the conversion predictable on messy real-world data.

Frequently asked questions

What is NDJSON / JSON Lines?

NDJSON (Newline Delimited JSON, also called JSON Lines or JSONL) is a format where each line of a file is its own valid, self-contained JSON object. It's common in log files, data pipelines, and streaming APIs because each line can be parsed independently.

How is the CSV header decided when objects have different keys?

The header is the union of every key seen across all NDJSON lines, in the order each key first appears. Rows missing a given key simply get an empty cell for that column.

Will converting CSV back to NDJSON guess my data types?

Only conservatively: a column becomes numbers or booleans in the JSON output only if every non-empty value in that column is a clean number or exactly "true"/"false". Otherwise values are kept as plain strings, so you never get silently mangled data.

Does this tool upload my data anywhere?

No. All parsing and conversion happens in your browser with JavaScript, and nothing is sent to a server.

Can it handle nested objects or arrays inside an NDJSON line?

Yes, pragmatically: nested objects and arrays are JSON-stringified into a single CSV cell rather than being flattened into multiple columns, so no data is lost.

What delimiters are supported for the CSV side?

Comma, semicolon, tab, and pipe - pick the one that matches your CSV file.

Related tools