What this tool does
Newline-delimited JSON goes in, one array comes out.
{"id": 1, "name": "Ada"}
{"id": 2, "name": "Grace"}
[
{
"id": 1,
"name": "Ada"
},
{
"id": 2,
"name": "Grace"
}
]
That is the whole format: one JSON value per line, no commas between them, no brackets around them. It is what log pipelines write, what bq load and many stream APIs expect, and what jq -c produces.
A bad line is named
{"a": 1}
{oops}
Invalid JSON on line 3
The blank line is skipped without a word — an NDJSON file often ends with one. The malformed line stops the conversion, and the message carries its number, so you can go straight to it. You get no partial array: half the records with nothing to say so is worse than an error.
Long numbers keep their digits
{"id": 12345678901234567890}
[
{
"id": 12345678901234567890
}
]
Past sixteen or so digits, a JavaScript number stops being exact: parse that id as a number and you get a different one back, silently. Both the reading and the writing here keep the literal as it was written, which is what makes a file of Twitter or Discord ids survive the trip.
What it does not do
- Reorder or deduplicate. The array holds the lines in the order they came, repeats included.
- Require objects. A line can be any JSON value:
1,"x"andnullare valid records, and they come through as such. - Split a line. Two values on one line is an error, not two records.
Private by design
Everything runs locally in your browser with JavaScript. Your data is never uploaded, which makes the tool safe for sensitive content, and it keeps working offline.