Free · No signup · Runs in your browser

NDJSON to CSVone row per line

Drop a .ndjson or .jsonl file and get a clean CSV in one click — every line parsed, every key a column, nested objects kept intact.

To convert NDJSON to CSV, drop or paste an NDJSON / JSON Lines file — csvtodashboard parses it into rows and columns in your browser, then emits a clean, RFC-4180 CSV with one header row. Fields are comma-separated with quoting only where a value contains a comma, quote or newline, so the file opens cleanly in Excel, pandas or any CSV reader. Nothing is uploaded; the whole conversion runs on your device.

01 · How it works

Three steps, then done.

NDJSON (newline-delimited JSON, also called JSON Lines) puts one JSON object on each line. This converter reads every non-empty line, unions the keys across all records to build the header, and writes one CSV row per object — entirely in your browser.

1

Paste or drop your NDJSON

Drop a .ndjson, .jsonl, or .txt file, or paste JSON Lines straight into the box. One JSON object per line — blank lines are ignored. Your data never leaves the page.

2

Keys become columns

Every line is parsed and its keys are collected in first-seen order, so the header is the union of all fields. Missing fields become empty cells; nested objects and arrays are written as compact JSON.

3

Download clean CSV

Get an RFC-4180 CSV with commas, quotes, and newlines properly escaped — ready for Excel, Google Sheets, or any data pipeline. Copy it or download the file.

02 · Why ours

Why convert NDJSON to CSVline-by-line, losslessly

NDJSON is the format of streaming logs, API exports, and big-data dumps. CSV is the format every spreadsheet and BI tool reads. This tool bridges the two without a server.

  • 01

    Built for streaming exports

    Log shippers, BigQuery, MongoDB, and many APIs emit one JSON object per line. We parse each line independently, so a single malformed record is reported by line number instead of failing silently.

  • 02

    Every field, every row

    Records in the wild have ragged shapes. We union all keys across the whole file in first-seen order, so a field that only appears on row 500 still gets its own column.

  • 03

    Nested data survives

    Arrays and sub-objects don't get flattened or dropped — they're serialized as compact JSON inside the cell, so nothing is lost on the way to the spreadsheet.

  • 04

    Private by design

    The conversion runs entirely in your browser with native JSON parsing. No upload, no account, no server logs — your data stays on your machine.

"One JSON object per line in, one clean CSV row per line out — keys unioned into columns, nested values kept as compact JSON."
csvtodashboard.com
Good to know

ndjson to csv notes.

Format-specific details worth knowing before you convert NDJSON to CSV.

  • Nesting is flattened, not kept

    NDJSON can nest objects and arrays; converting to CSV flattens them into dot-notation columns (e.g. user.address.city). Every value is preserved, but the hierarchy is not.

  • Quoting only when needed

    Fields containing a comma, quote or newline are wrapped in double quotes (with internal quotes doubled), per RFC 4180; everything else stays bare.

  • Excel's leading-zero trap

    CSV is plain text, so a code like 007 is preserved in the file — but Excel may strip the zero on open. Import the column as text if that matters.

  • One header, even columns

    The first row is the header and every row carries the same column count, so spreadsheets and parsers never misalign.

03 · FAQ

ndjson to csv questions.

What is the difference between NDJSON, JSON Lines, and JSONL?
They are the same format under different names: a text file where each line is a complete, independent JSON value (usually an object). The .ndjson, .jsonl, and .jsonlines extensions all describe it. This tool accepts all of them.
We scan every record and collect keys in the order they first appear, then use that union as the header row. If a key shows up only on some lines, every other row simply gets an empty cell for that column.
They are written into the cell as compact JSON — for example an array becomes ["a","b"] and a sub-object becomes {"x":1}. The CSV quoting rules then wrap and escape that text so it round-trips cleanly.
The converter stops and tells you the exact line number that failed, so you can fix the offending record. Blank lines are skipped and never cause an error.
No. Parsing and CSV generation happen 100% client-side in your browser using the built-in JSON parser. Nothing is sent to a server, so even large or sensitive exports stay private.