My Tools Garage

NDJSON to JSON

Convert NDJSON / JSON Lines into a JSON array.

in-browser

How to use

  1. 1 Paste your NDJSON / JSON Lines data into the input box.
  2. 2 Pick an indentation option, or choose minified for compact output.
  3. 3 Review the generated JSON array on the right.
  4. 4 Copy the result, or fix the reported line number if a line is invalid.

About NDJSON to JSON

NDJSON to JSON converts newline-delimited JSON — also known as JSON Lines or JSONL — into a single, well-formed JSON array.

Log files, streaming API exports, BigQuery and Elasticsearch dumps and many data pipelines emit one JSON object per line; this tool wraps those records into a proper array so you can load them with a normal JSON.parse, paste them into another tool, or inspect them comfortably.

Paste your line-delimited data on the left and the converted array appears instantly on the right.

Each non-empty line is parsed individually, so blank lines between records are ignored and any whitespace is trimmed.

If a line is not valid JSON, the tool tells you exactly which line number to fix instead of failing silently, which makes cleaning up a messy export much quicker.

You can choose two- or four-space indentation for a readable result, or pick the minified option to produce the most compact array possible for storage or transport.

Every line is parsed locally in your browser, so even sensitive data never leaves your machine and the converter keeps working offline once the page has loaded.

The output is standard JSON you can copy with a single click and drop straight into code, a config file or another converter.

FAQ

What is the difference between NDJSON and JSON?

NDJSON (JSON Lines) stores one independent JSON value per line with no enclosing array, which is ideal for streaming and logs. This tool combines those lines into one standard JSON array.

What happens if a line is invalid?

Conversion stops and the tool reports the exact line number that failed to parse, so you can locate and fix the malformed record quickly.

Are blank lines a problem?

No. Empty or whitespace-only lines are ignored, so trailing newlines and gaps between records are handled gracefully.