Boneyard Tools

NDJSON to JSON Array Converter

Paste NDJSON or JSONL to get a clean JSON array, or switch direction to turn an array back into newline-delimited JSON. One object per line.

How to convert NDJSON to JSON

  1. Paste your NDJSON or JSONL (or a JSON array) into the box.
  2. Pick the direction: NDJSON to JSON or JSON to NDJSON.
  3. Copy the converted result.

Examples

Lines to an array

{"id":1}
{"id":2}
[
  {
    "id": 1
  },
  {
    "id": 2
  }
]

Frequently asked questions

Is my data uploaded anywhere?

No. The conversion runs entirely in your browser, so your data never leaves your device.

What is the difference between NDJSON and JSONL?

They are the same idea: one self-contained JSON value per line. This tool treats NDJSON and JSONL identically.

Are blank lines a problem?

No. Blank or whitespace-only lines are skipped, so trailing newlines and spacing between records are fine.

What happens if one line is invalid?

Conversion stops and the error names the 1-based line number, counting blank lines, so you can jump straight to the bad record.

What does JSON to NDJSON need as input?

A top-level JSON array. Each element is written compactly on its own line, in array order.

Related tools