Convert JSON to JSONL
Turn JSON files into JSONL. Each entry of a top-level list becomes one line of compact JSON, and any other value becomes a single line, with values and key order kept.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop JSON files on the dialor turn it to pick what to do
One line of JSON per entry.A JSON list becomes JSON Lines, with values and key order kept.
What you get
A single JSONL file. Each entry of a top-level list becomes one line of compact JSON, so a list of objects turns into one object per line.
Any other value, such as a single object, becomes one line.
What stays the same
The values and the key order are kept. Each line is compact JSON.
To go the other way, use JSONL to JSON.
When it fails
If the file cannot be parsed, the conversion stops with
input_corrupted. This happens when the input is not valid JSON.
JSON and JSONL.What each format is.
The formats
JSON
JSON, the data format of every API.
- Extensions
- .json
- MIME type
- application
/json - Kind
- Text and data
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
In your code.The same JSON to JSONL conversion through the API, for your app or your agent.
$ cv convert report.json report.jsonl$ cv convert report.json report.jsonlQuestions.What people ask about JSON to JSONL.
Each entry of the top-level list becomes one line of compact JSON. The output is one file.
It becomes a single line.
Yes. The values and the key order are kept.
The file could not be parsed. The conversion stops with this code when it cannot read the input as JSON.