Skip to main content
>_devtools

NDJSON to JSON

Convert NDJSON (JSON Lines) into a single JSON array, reporting the line of any invalid record.

What this does

Paste newline-delimited JSON to collect its records into one formatted JSON array. Errors identify the line that could not be parsed.

Example

Input:
{"id":1}
{"id":2}

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

Limits and behavior

  • Blank lines are ignored.
  • Every non-empty line must contain one valid JSON value.