NDJSON / JSON Lines to JSON Converter

Convert NDJSON (one JSON object per line) to a JSON array, or a JSON array to NDJSON. Runs locally in your browser.

About this tool

NDJSON, also called JSON Lines, stores one JSON value per line and is common in logs and data exports. Paste lines to get a formatted JSON array, or paste a JSON array to get one compact object per line. The direction is detected automatically.

Related: JSON Formatter & Validator · Base64 Encode & Decode · URL Encoder & Decoder · SHA-256 / SHA-1 Hash Generator · Unix Timestamp Converter

Frequently asked questions

What is NDJSON?

Newline-delimited JSON: one complete JSON value per line, handy for logs and streaming.

How is it converted?

Each line is parsed and collected into a JSON array, or the reverse.

What if a line is invalid?

The tool reports the offending line number.