JSON Lines to JSON Converter
This converter combines a JSON Lines file into a single JSON array, which is what most tools that expect JSON actually want. Blank lines are skipped. The genuinely useful part is the error reporting: if a line will not parse, the message names the line number rather than reporting a failure somewhere inside a very long document. That is the whole difficulty with debugging JSON Lines by hand — a file of 100,000 records where one is malformed gives you nothing to go on unless the tool tells you which line it was.
How it works
Combines a JSON Lines file into a single array, which is what most tools that expect JSON actually want. Blank lines are skipped.
If a line will not parse, the error names the line number rather than reporting a failure somewhere in a very long file — which is the whole difficulty with debugging JSON Lines by hand.
Everything runs in your browser — nothing you paste is sent to a server.
Finding the bad line
The practical problem with JSON Lines is that a single malformed record makes a whole file unusable, and most tools report it as "unexpected token" with a character offset into a file that may be gigabytes long.
Because each line is parsed separately here, the error can name the line — which turns a search into a jump.
Common causes of a bad line
- A record containing a raw newline, which splits it across two lines.
- A truncated final line, from a file that was still being written.
- A log line that is not JSON at all — a stack trace or a startup banner mixed into the stream.
- A trailing comma left over from converting an array by hand.
Frequently asked questions
How do I convert JSON Lines to JSON?
Paste the file into the left panel. The records are combined into a single array on the right.
What happens to blank lines?
They are skipped. A blank line carries no record, so including it would produce a spurious entry.
What if one line is malformed?
The error names the line number and describes the problem, so you can go straight to it instead of searching a file of thousands of records.
Does it validate every line?
Yes. Every line is parsed, so one bad record anywhere is found rather than the conversion silently producing partial output.
Can I get pretty-printed output?
Yes — the array is indented for readability. If you need it compact, run it through the JSON minifier afterwards.
Is my file uploaded?
No. The conversion runs entirely in your browser.
Related tools
JSON to JSON Lines Converter
This converter turns a JSON array into JSON Lines, one record per line.
JSON Formatter & Beautifier
This JSON formatter beautifies minified or messy JSON online with clean indentation, line numbers, and code folding.
JSON to CSV Converter
This JSON to CSV converter turns an array of objects into spreadsheet-ready rows and columns.