The JSON to JSONL converter turns a JSON array into JSONL — also called NDJSON or newline-delimited JSON — where every element becomes its own minified JSON document on a single line. Flip the direction to parse a JSONL file back into a clean, pretty-printed JSON array.
Everything runs entirely in your browser with no upload, so datasets, training examples and records that may hold personal or proprietary data never leave your machine. It is free, needs no account and has no size limits.
It is built for the people who live in this format: engineers preparing OpenAI or other LLM fine-tuning files, data teams streaming records into BigQuery or Elasticsearch, and anyone who has a JSON array on one side and a line-per-record pipeline on the other.
Paste a JSON array and each element is emitted as one minified JSON document per line. A single non-array value (an object, string or number) simply becomes one line, so the tool works whether you have a full array or a single record.
Flip the direction with the swap control and paste JSONL. Every non-empty line is parsed as an independent JSON document and the results are collected into a pretty-printed JSON array with two-space indentation.
Blank or whitespace-only lines are skipped when reading JSONL, so trailing newlines and spacing between records do not break the conversion. Each output line is compact JSON with no internal newlines, which is exactly what JSONL consumers expect.
If a line is not valid JSON, the converter stops and tells you the exact line number and the parse error instead of failing silently, so you can jump straight to the malformed record in a large file.
JSONL (JSON Lines), also called NDJSON (newline-delimited JSON), is a format where each line is a complete, independent JSON document. It is used for logs, data streaming and machine-learning datasets because a program can read and process one record at a time without loading the whole file.
Paste your JSON array of training examples — each an object with a messages array — and the converter outputs one example per line, which is the JSONL layout OpenAI fine-tuning expects. Copy the result into your .jsonl file. The conversion is client-side, so your training data is never uploaded.
A JSON file is a single document, usually one array or object that must be parsed as a whole. JSONL is many separate JSON documents, one per line, with no enclosing array and no commas between records — which makes it streamable and append-friendly. This tool converts between the two in either direction.
No. The conversion runs entirely in your browser, so arrays, records and fine-tuning datasets never leave your machine and nothing is sent to a server.
Blank and whitespace-only lines are skipped automatically. If a line contains invalid JSON, the converter reports the exact line number and the parse error so you can fix that record.