Skip to content
migration.tools
NDJSON to JSON

NDJSON to JSON converter

Combine newline-delimited JSON (JSONL) records into a single, formatted JSON array.

Going the other way? JSON to NDJSON

Options

NDJSON

JSON

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 NDJSON or drop a file onto the input panel.
  2. 2Adjust the options — the result updates as you type.
  3. 3Copy the JSON or download it. Drop several files to convert a batch into one ZIP.

How NDJSON becomes JSON

NDJSON and JSON 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.

NDJSON and JSON, briefly

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.

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.

Questions

What if one line is broken?

The converter stops and reports the line number and the JSON error, so you can fix that record instead of silently losing it. Blank lines are ignored.

Does the converter guess data types?

Yes, unless you turn it off. Whole numbers, decimals, true and false become real JSON numbers and booleans. Values with leading zeros (like ZIP code 00501), numbers longer than 15 digits and anything that isn't unambiguously numeric stay as strings, so IDs and phone numbers survive intact.