Convert NDJSON to JSON (and back)

Convert NDJSON (one JSON object per line, a common format for logs and data streams) into a standard JSON array, or the other way around.

Example:

NDJSON to JSON

JSON to NDJSON

How it works

NDJSON ("Newline Delimited JSON") is a format where each line holds an independent JSON object — widely used for log files, event streams or large exports that can be processed line by line without loading everything into memory. This tool converts in both directions: gather an NDJSON file into a single JSON array that most standard tools can work with, or split a JSON array into NDJSON for ingestion by a log or streaming pipeline.

What happens if a line of the NDJSON contains invalid JSON?

The conversion stops with an error message giving the number of the faulty line, so you can fix it quickly without having to inspect the whole file.

Are blank lines in the NDJSON a problem?

No, empty lines or lines containing only spaces are automatically skipped during the conversion to JSON.

100% local processing: the conversion runs entirely in your browser via WebAssembly — your data never leaves your device.