JSONL / NDJSON ↔ JSON Array Converter

JSON Lines (one JSON object per line, also called NDJSON) is the standard format for log files, streaming APIs, BigQuery exports, and OpenAI fine-tuning datasets. Convert between JSONL and standard JSON array form in either direction.

How to use the JSONL / NDJSON ↔ JSON Array Converter

Choose a direction — JSONL to a JSON array, or a JSON array to JSONL — paste your input, and the converted output appears below ready to copy.

Converting between JSONL and JSON arrays

JSON Lines (one JSON object per line, also called NDJSON) is what streaming APIs, log pipelines, BigQuery exports, and OpenAI fine-tuning datasets expect, because each line parses on its own and a file can be processed without loading it whole. A standard JSON array is the opposite shape — a single bracketed structure parsed all at once.

This converts between the two in both directions: JSONL into a pretty-printed JSON array, or an array back into one-object-per-line JSONL. To build an array in the first place, the TSV to JSON and HTML table to JSON converters produce arrays this tool can turn into JSONL.

Common use cases

  • Prep fine-tuning data — convert a JSON array to JSONL for OpenAI.
  • Read a log file — turn NDJSON logs into one array to inspect.
  • Stream to batch — collect streamed JSONL into a single array.
  • BigQuery export — reshape array data to newline-delimited JSON.
  • Inspect a dataset — pretty-print JSONL records as an array.

Frequently asked questions

What is the difference between JSONL and NDJSON?

They are the same thing — one JSON value per line. The terms are interchangeable.

Does it validate each line?

Each line must be valid JSON; a malformed line is reported rather than silently dropped.

Which directions are supported?

Both — JSONL to a JSON array and a JSON array to JSONL.

Where do JSON arrays come from?

Tools like TSV to JSON and HTML table to JSON produce arrays you can convert here.
Embed this tool on your site

Free to embed, no attribution required (but appreciated). Paste this where you want the tool to appear: