What is JSON Lines?

JSON Lines is one complete JSON object per line, with no enclosing array and no commas between records. The file is not valid JSON as a whole, and that is the point.

Who uses it

Log pipelines, machine learning datasets and anything that appends records or reads them in a stream.

Reading JSON Lines

Each line is parsed on its own, so a corrupt record does not take the file with it. Keys are unioned across lines in first-seen order, so a record missing a field leaves that cell empty rather than shifting the columns.

Writing JSON Lines

Every row becomes one line. You can append to the file forever without rewriting it, and a reader can process it a line at a time without holding the whole thing in memory.

What it can hold

JSON Lines is a data interchange format. One complete JSON object per line, so a file can be read a row at a time without holding all of it in memory. A machine can read the table back out of it without guessing, which is what makes it safe to convert into and out of.

It keeps

It cannot express

What it looks like

Example JSON Lines
{"id":"007","name":"Halima Yusuf","role":"Analyst, data","started":"2024-03-15","hours":"38.5"}
{"id":"012","name":"Jonah \"Jo\" Pryce","role":"Engineer","started":"2025-11-02","hours":""}
{"id":"104","name":"Wei Chen","role":"Manager","started":"2023-06-30","hours":"40"}

Questions

What is the difference between JSON and JSON Lines?

JSON wraps records in an array, so a reader must load the whole document before it can use any of it, and appending means rewriting the file. JSON Lines has no wrapper, so records can be streamed and appended one at a time. Use JSON for a payload, JSON Lines for a log.

How do I open JSON Lines files?

Any text editor will show you the contents. To read it as a table, paste it into the converter on this site and it appears in an editable grid. Nothing is uploaded.

Is JSON Lines a good format for sharing data?

It depends who is receiving it. Log pipelines, machine learning datasets and anything that appends records or reads them in a stream. If the recipient is outside that group, a plain CSV travels further than anything else.

Convert JSON Lines to something else

Convert something else to JSON Lines