Zero Signup ToolsFree browser tools

Converter Tools

NDJSON to CSV Converter

Convert NDJSON (JSON Lines) to CSV in your browser. Per-line error reporting, nested key flattening, RFC 4180 quoting, and tab, semicolon, or pipe delimiters.

Delimiter

Comma is the default CSV separator. Semicolon is common in European Excel locales. Tab outputs a TSV file.

Line endings

CRLF matches what Excel writes when saving a CSV on Windows. LF is the cross-platform default for data pipelines.

Nested values

Bad lines

560 chars

Conversion runs entirely in your browser. Your NDJSON is never sent to a server.

What is NDJSON and where does it come from?

NDJSON (newline-delimited JSON), also called JSON Lines or JSONL, is the streaming text format used by BigQuery, Athena, and Snowflake bulk loads, OpenAI and Anthropic fine-tune training files, logging pipelines such as Fluentd, Vector, Loki, and Filebeat, jq output without the -s flag, and any HTTP API that streams one event per line. Each line is a complete JSON value separated by a single LF, with optional CRLF on Windows. Converting to CSV turns these streaming records into a flat spreadsheet you can open in Excel, Google Sheets, Numbers, or load into a BI tool.

Tips for clean conversions

  • Leave nested values on Flatten with dotted keys so an object like { "address": { "city": "London" } } becomes the column address.city.
  • If a record spans multiple lines, your input is regular JSON and not NDJSON. The JSON to CSV Converter handles that shape directly.
  • Use Add UTF-8 BOM if non-ASCII characters look broken in Excel on Windows. Google Sheets and modern Excel for Mac do not need it.
  • Pick CRLF line endings when the consumer is Excel on Windows and LF for everything else. The default LF works with Google Sheets, Numbers, pandas, and command-line tooling.
  • Switch Bad lines to Stop on the first bad line when your pipeline must reject malformed input. The default Skip mode is for log dumps and exports where a few corrupt lines should not block the rest.

How to use

  1. Paste your NDJSON into the input box. One JSON value per line, separated by LF or CRLF, with optional blank lines between records.
  2. Pick a delimiter: Comma for standard CSV, Semicolon for European Excel locales, Tab for a TSV download, or Pipe for tools that struggle with embedded commas.
  3. Pick LF or CRLF for line endings. CRLF matches Excel on Windows; LF is the cross-platform default for data pipelines and command-line tools.
  4. Choose Flatten with dotted keys to expand nested objects and arrays into address.city or tags.0 columns, or Keep as JSON strings to store the raw nested structure inside one cell.
  5. Pick Skip bad lines, keep going to convert as much as possible and list any unparseable lines below the CSV, or Stop on the first bad line when your pipeline must reject malformed input.
  6. Toggle Include header row, Quote every field, and Add UTF-8 BOM as your consumer requires. The defaults match what most spreadsheet apps expect.
  7. Click Copy CSV to copy the result, or Download .csv (or .tsv when Tab is selected) to save a file. Conversion runs entirely in your browser; nothing you paste is uploaded.

About this tool

NDJSON to CSV Converter turns newline-delimited JSON (also called JSON Lines or JSONL) into RFC 4180 CSV entirely in your browser. NDJSON is the streaming text format where each line is one complete JSON value: BigQuery, Athena, and Snowflake bulk exports use it, OpenAI and Anthropic fine-tune and batch files use it, jq emits it by default, and logging pipelines (Fluentd, Vector, Loki, Promtail, Filebeat) write logs in this shape. Getting that data into a spreadsheet means parsing it line by line, building a header from the union of every record's keys, and quoting cells correctly for the CSV consumer. The parser handles the edge cases that production NDJSON files actually hit: a leading UTF-8 BOM from Notepad or Excel exports is stripped before parsing, CRLF (Windows) and LF (Unix) line terminators are accepted in the same input, blank lines between records are tolerated, and records that fail to parse are listed with their line number, the JSON error message, and a short preview so you can spot the problem at a glance. Pick between Skip bad lines (keep going and list errors below the CSV) or Stop on the first bad line for strict pipelines. Nested values can flatten into dotted column names (address.city, tags.0) using the same convention as pandas.json_normalize and the flat library, or stay as JSON strings inside one cell when downstream tooling expects raw structure. Header inference walks every record in first-sighting order so a ragged dataset still produces a complete CSV with every unique column present. Output options match what real CSV consumers need: comma, semicolon, tab, or pipe delimiter; LF or CRLF line endings; an Always quote toggle for strict consumers; an optional UTF-8 BOM so Excel for Windows opens Unicode files without mojibake; and an optional header row. Copy the result to the clipboard or download it as data.csv (or data.tsv when the tab delimiter is selected). Everything runs locally; the NDJSON you paste is never uploaded to a server.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsConverter Tools