JSON to JSONL Converter

Convert a JSON array to JSONL, one element per line. It also repairs pretty-printed files, where each record is spread over several lines.

Runs entirely in your browser. Your file is never uploaded. How this works

Example

This JSON:

[
  { "id": 1, "name": "Ada" },
  { "id": 2, "name": "Lin" }
]

Becomes this JSONL:

{"id":1,"name":"Ada"}
{"id":2,"name":"Lin"}

Frequently asked questions

What input does this accept?
A JSON array, a single JSON object, or several JSON values one after another, including pretty-printed ones.
Can it convert a very large JSON file?
Yes. It reads the file in pieces and extracts one record at a time, rather than parsing the whole document at once. A single record still has to fit in memory.
What if my array is nested inside an object?
A file like {"data":[...]} is treated as one record. Extract the inner array first, for example with jq: jq ".data" file.json.

Related tools