JSON Lines to JSON Converter
Turn JSON Lines (NDJSON) into one JSON array, with the line number of any record that is not valid.
Processed on your device. Files are not uploaded
How to convert JSON Lines to JSON
Paste your JSON Lines
Paste or type it into the box, or press Try an example.
Pick the layout
Choose how the array is laid out.
Copy or download
Use the array in your code.
Worked example
This is what JSON Lines to JSON Converter gives for its own sample values. Open the tool above and change anything to try your own.
JSON Lines
{"id":1,"name":"Ada"}
{"id":2,"name":"Linus"}
{"id":3,"name":"Grace"}- Indentation
- 2 spaces
JSON
[
{
"id": 1,
"name": "Ada"
},
{
"id": 2,
"name": "Linus"
},
{
"id": 3,
"name": "Grace"
}
]About JSON Lines to JSON Converter
Turn JSON Lines (NDJSON) into a single JSON array. If a line is not valid JSON, the message names the line number.
FAQs
Are blank lines allowed?
Yes. They are skipped.
What if one line is broken?
The error shows its line number so you can fix it.
Can I convert back?
Use JSON to JSON Lines Converter.