About JSONL to JSON
JSONL to JSON takes a block of JSON Lines — also called NDJSON, where each line is one complete JSON object — and folds the whole thing into a single JSON array. Feed it three lines of objects and it returns one array holding all three, indented for reading. It is the bridge between the line-oriented format that streaming systems prefer and the nested document you actually want to inspect.
JSON Lines exists because it is easy to append to and easy to read one line at a time. Log processors, data pipelines and command-line tools emit it constantly, because a stream of independent objects needs no enclosing brackets and survives being split anywhere between lines. The trade-off is that the same stream is awkward to read as a whole, and that is exactly the gap this converter fills.
The output is a standard JSON array with two-space indentation, so every object in the input becomes an element you can expand and inspect. Two details are worth knowing: empty lines in the input are skipped rather than becoming empty elements, and a line that is not valid JSON stops the conversion with an error instead of silently producing a mangled result.
How to use JSONL to JSON
- 1 Paste the JSON Lines input, one object per line.
- 2 The array is assembled live as you type, with each object as an element.
- 3 Copy the JSON array for inspection or further processing.
Frequently asked questions
What is JSON Lines or NDJSON?
It is a format where each line is one complete, independent JSON object, with no enclosing brackets and no commas between lines. It is common in logs and data pipelines because it can be appended to and read line by line without parsing a whole document.
What happens to blank lines in my input?
They are skipped. Only lines that contain a JSON object become elements of the array, so trailing newlines and gaps between records do not produce empty entries.
What if one of my lines is not valid JSON?
The conversion stops and reports a parse error, because the tool parses every line. That is deliberate — silently dropping a malformed record would corrupt the data, so the failure is surfaced instead.
Can I convert in the other direction?
That is a separate tool, JSON to JSONL, which takes a JSON array and writes each element as its own line. The two together let you round-trip data between the array form and the streaming form.
Free, online, and private
Free to use
JSONL to JSON is completely free. There is no account to create, no login, and no hidden charge or usage limit.
Runs online in your browser
It is a free online tool that runs entirely in your browser. Nothing to download or install — open the page and start using it right away.
Your data stays private
All processing happens locally on your device. Your input is never uploaded, stored, or tracked, so it never leaves your browser.
How JSONL to JSON behaves in detail
These are the specifics of this implementation — the exact ranges, defaults and fixed settings you are working with.
| Parameter | Value |
|---|---|
| Output | a single JSON array, pretty-printed with JSON.stringify(..., null, 2) |
| Line handling | the input is split on newline characters and any line that is empty or whitespace-only is dropped before parsing |
| Per-line parse | each remaining line is run through JSON.parse independently and appended to the array in input order |
| Order | array order is exactly the line order of the input; there is no sorting or keying |
| Element shape | no shape is enforced — objects, arrays and bare scalars are all accepted as array elements |
| Sample | {"a":1} on one line, {"a":2} on the next and {"a":3} after that |
| Live | kind is `text`, so the result refreshes as the input changes and there is no run button |
Compiled from the implementation of this tool and checked against it by itoolnet.
What JSONL to JSON does not do
Knowing the edges of a tool saves more time than another list of its features. These are the cases where it will not do what you might expect.
- One malformed line aborts the whole conversion. Every line goes through JSON.parse with no try / catch, so a single trailing comma, a stray brace or a half-written line throws and the entire output is lost rather than the good lines being kept.
- Any value other than an object is accepted without complaint. A file of bare numbers or quoted strings parses into a perfectly valid array of scalars, so a file that was never line-delimited JSON in the first place can come back looking like a success.
- There is no streaming and no size limit guidance. The whole document is held in memory as one string, split into an array, parsed element by element and then re-serialised — the page gives no indication of where that stops being sensible for a large export.
- One complete JSON value per line is the only shape accepted. The split is a plain break on the newline character with no awareness of nesting or string quoting, so a pretty-printed object pasted as several lines is cut into fragments and each fragment fails to parse, taking the whole conversion down with it.
Tested and documented by itoolnet, the team that builds and maintains this site.