RealJSON
Try now

JSONL / NDJSON ⇄ JSON Converter

Convert JSON Lines to a JSON array — or an array back to JSONL — with line-level error reporting.

Direction

JSON Lines input

JSON array

 

In short: JSONL (JSON Lines), also known as NDJSON, is a file format with one JSON value per line. This converter turns JSONL into a regular JSON array and back, pointing to the exact line number of any syntax error.

JSONL to JSON and JSON to JSONL

Log pipelines, BigQuery exports, OpenAI fine-tuning files and many databases emit JSON Lines. Regular JSON tools choke on them because the file as a whole is not one valid JSON document.

Preparing a fine-tuning dataset? Check it line by line with the Fine-Tuning JSONL Validator before uploading it to OpenAI or Amazon Bedrock.

Paste the lines here to get a pretty-printed array you can feed to the JSON Viewer or JSON to CSV, or flip the direction to produce a JSONL file from an array.

Features

Line-accurate errors

A malformed record is reported as Line 7: Unexpected token … so you can fix the source quickly.

Tolerant parsing

Blank lines and Windows (CRLF) line endings are ignored; optionally skip invalid lines entirely.

Compact output

JSON → JSONL writes each item as minified JSON on its own line, ready to append or stream.

Frequently Asked Questions

What is JSONL (JSON Lines) or NDJSON?

JSON Lines, also called NDJSON (newline-delimited JSON), stores one complete JSON value per line. It is popular for logs, data exports and machine-learning datasets because files can be streamed and appended to line by line.

How do I convert JSONL to a JSON array?

Paste your JSON Lines, keep the direction on "JSONL → JSON array", and the lines are parsed into a single formatted array. The reverse direction writes each array item on its own line.

What happens to invalid lines?

By default the first invalid line is reported with its line number. Tick "Skip invalid lines" to drop bad lines and convert the rest.

Is there a size limit?

There is no server limit because everything runs in your browser; very large files are bounded only by your device memory.

Is my data uploaded?

No. Conversion happens locally.

Related Tools

Fine-Tuning JSONL Validator · JSON Viewer · JSON to CSV · JSON Formatter

Browse all free JSON tools →

Related tools