Skip to content
100% local

JSONL converter

Convert between a JSON array of objects and JSONL / NDJSON, one object per line.

Input
Output

JSONL converter

JSONL (also called NDJSON, newline-delimited JSON) stores one JSON object per line instead of wrapping everything in a single array. It is the format most LLM fine-tuning datasets, log pipelines and streaming APIs expect, since a consumer can read one record at a time without loading the whole file into memory. This tool converts both ways: paste a JSON array of objects to get JSONL out, or paste JSONL to get a single JSON array back.

A JSON array converted to JSONL always produces one compact object per line — that is the definition of the format, so formatting choices apply on the array side instead. "Array indent" controls how the resulting array is printed: two or four spaces for a readable, diffable file, or minified for the smallest output. "Skip empty lines" ignores blank lines in pasted JSONL instead of treating them as a parse error. "Report line number on error" names the exact line a parse failure happened on, so a bad record in a 50,000-line export is easy to find. "Preserve key order" keeps each object's keys exactly as written; turn it off to sort keys alphabetically for easier diffing.

Both directions handle Windows and Unix line endings interchangeably and process tens of thousands of records in well under a second, with the exact time shown in the tally under the output, alongside how many records went in, how many came out, and how many blank lines were skipped.

Everything runs locally in your browser. Your data is never uploaded, which matters for training datasets, API logs or exports that may contain private information. Copy the result, download it as a .txt file, or send it into another tool such as the JSON formatter or JSON-to-CSV converter to continue the pipeline.

FAQ

What is the difference between JSONL and NDJSON?
They are the same format under two names: one JSON value per line, with no surrounding array or commas between lines. This tool treats "JSONL" and "NDJSON" as interchangeable.
Does the array-to-JSONL direction support an indented output?
No — JSONL requires exactly one JSON value per line, so each line is always compact. The indent option only applies when converting JSONL back into a JSON array.
What happens to blank lines in a JSONL file?
With "Skip empty lines" on (the default) they are ignored. Turn it off to have a blank line reported as a parse error instead, with its line number.
How are parse errors reported?
With "Report line number on error" enabled, the error names the exact line that failed to parse and the underlying reason, so you can jump straight to the bad record.
Is my data uploaded anywhere?
No. The conversion runs entirely in your browser — your JSON or JSONL never leaves your device.