JSONL / NDJSON converter

NDJSON ↔ JSON array, both directions: line-numbered errors, tolerant skipping, logs-friendly.

Logging pipelines, stream processing and LLM APIs all favor JSON Lines (NDJSON): one JSON object per line, append-friendly, readable without loading the whole file. But NDJSON is hostile to humans and ordinary editors — thousands of brace-only lines with no commas or wrapper, impossible to eyeball, sort or filter until it becomes a proper JSON array.

This tool converts both directions. NDJSON → array parses line by line and reports exactly which line failed and why, instead of a blanket "invalid JSON"; tolerant mode skips bad lines and keeps going, which is exactly what a truncated log needs. The reverse direction packs an array into one object per line, ready to write out as NDJSON.

In NDJSON, errors belong to lines

A standard JSON file dies as a whole on the first syntax error; NDJSON is designed for isolation — each line stands alone. So the parser reports per line: which line, what reason. Empty lines are skipped, and lines starting with // are treated as comments (a common convention in the jq/NDJSON world) and excluded from results.

What each direction is for

NDJSON → array turns a log file into one JSON document you can paste into jq, JSONPath or the mock data generator, and simply read. Array → NDJSON splits a bulk export into append-only lines for databases, importers and streaming endpoints. Switching direction carries the output back into the input, so a round trip shows you exactly how lossless the chain is.

Frequently asked questions

What is NDJSON, and how does it differ from JSON?
NDJSON (Newline Delimited JSON, also called JSON Lines) requires exactly one valid JSON value per line, with no commas and no wrapping brackets. The difference is structural: a JSON array is one document (parsed as a whole), NDJSON is a sequence of lines (appendable, streamable).
Can bad lines be skipped without polluting the result?
Yes. With "skip lines that fail to parse" enabled, the parser lists every skipped line number and the result contains only successfully parsed records. Skipping is always reported — nothing is silently swallowed.
Is the conversion local?
Yes. Parsing and serialization run entirely in the browser; logs often contain sensitive data, and none of it leaves the page.

Related tools