JSON Lines to JSON array converter
Useful for opening .jsonl logs or exports in tools that only read regular JSON.
Loading the tool…
Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.
How to use it
- Enter json lines and indent.
- The result appears straight away and updates as you edit.
- Copy the result, or copy a link that keeps the same values to share it.
How it is calculated
Every non-empty line is parsed as its own JSON value, then the values are placed in order in one array and formatted with the chosen indent. Blank lines are skipped.
Example
Inputs: Indent = 2 spaces. Result: JSON: [ { "id": 1, "name": "Ali" }, { "id": 2, "name": "Sara" } ]; Records: 2.
{"id": 1, "name": "Ali"}
{"id": 2, "name": "Sara"}
[
{
"id": 1,
"name": "Ali"
},
{
"id": 2,
"name": "Sara"
}
]Limits and caveats
- A JSON value spread over several lines is not valid JSON Lines and gives an error.
- Conversion stops at the first invalid line and reports its number.
Questions about this tool
What if the file has blank lines?
They are skipped, including the empty line at the end of the file.
Does key order change?
No. Keys keep their original order and numbers keep their exact text with no rounding.
How do I find the broken line?
The error message gives the line number and the reason, such as a stray comma or a missing quote.
