Skip to content
migration.tools
JSON to NDJSON

JSON to NDJSON converter

Convert a JSON array to newline-delimited JSON (JSON Lines) for BigQuery, Elasticsearch bulk imports, fine-tuning datasets and streaming pipelines.

Going the other way? NDJSON to JSON

JSON

NDJSON

The result appears here as soon as there is input.

Processed on this device. Nothing you paste or drop is uploaded.

How to use it

  1. 1Paste your JSON or drop a file onto the input panel.
  2. 2Adjust the options — the result updates as you type.
  3. 3Copy the NDJSON or download it. Drop several files to convert a batch into one ZIP.

How JSON becomes NDJSON

JSON and NDJSON both describe nested data, so structure carries over directly: objects stay objects, lists stay lists, and key order is kept.

The differences are in the details each format can express — comments, nulls, dates and attributes — and the notes under the output tell you whenever something had to be adapted.

JSON and NDJSON, briefly

JSON is the default language of web APIs and document databases. It nests objects and arrays to any depth and distinguishes strings, numbers, booleans and null, but has no comments and no date type.

NDJSON (also called JSON Lines) puts one JSON object on each line. It is what BigQuery, Elasticsearch bulk imports, OpenAI fine-tuning files and most log pipelines expect, because it can be streamed and appended to.

Questions

What if my JSON isn't an array of objects?

The converter looks for the list of records inside the document — for example the array under "data" or "items" in an API response — and tells you which one it used. A single object becomes one row.