Convert JSONL to JSON

Turn JSONL files into JSON. One list with an entry per line.

Converted in an isolated sandbox on our serversDeleted after 24 hours

Drop JSONL files on the dialor turn it to pick what to do

One list with an entry per line.Each line of the JSONL file becomes one entry in a single JSON list.

  1. What you get

    One JSON file that holds a list. Every line of the JSONL file is one entry in that list, in the same order as the lines.

    Values and key order are kept as they are in each line. Blank lines are skipped, so they leave no empty entries.

  2. When it stops

    If the file cannot be parsed, the conversion stops with input_corrupted. No JSON file is produced in that case.

  3. Going the other way

    To turn a JSON list back into one entry per line, use JSON to JSONL. The conversion has no options, so there is nothing to set.

JSONL and JSON.What each format is.

The formats

From · JSONL

JSON Lines

JSON Lines, one JSON object per line, the format of logs and datasets.

Extensions
.jsonl .ndjson
MIME type
application/jsonl
Kind
Text and data
To · JSON

JSON

JSON, the data format of every API.

Extensions
.json
MIME type
application/json
Kind
Text and data

In your code.The same JSONL to JSON conversion through the API, for your app or your agent.

terminal
$ cv convert report.jsonl report.json
$ cv convert report.jsonl report.json

Questions.What people ask about JSONL to JSON.

01OF 04

Yes. The entries appear in the list in the same order as the lines. Key order inside each entry is kept too.

They are skipped. A blank line does not add an entry to the list.

Yes. NDJSON files, with the extension ndjson, are read as JSON Lines, the same as files ending in jsonl.

The file could not be parsed. The conversion stops with input_corrupted and gives no JSON file.

More conversions.Other ways in and out of JSONL and JSON.