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.