Skip to content
{}

JSONL to JSON

Convert JSON Lines or NDJSON into a single JSON array, with per-line error reporting.

0 chars | 1 lines
0 chars | 0 lines

Conversion payloads stay in this browser tab and are never placed in page URLs - see how local processing works. Privacy-safe analytics record only the tool, outcome, and a coarse input-size bucket.

How to Convert JSON Lines to JSON

Paste or upload the file and each line is parsed independently, then collected into one array in original order. The array form is what most JSON viewers, JSONPath queries, and spreadsheet converters expect, so this is usually the first step when inspecting an export by hand.

When to Use Each Form

JSON Lines is for streaming and appending: a process can write one more record without rewriting the file, and a reader can stop early. A JSON array is for documents that are read as a whole - API responses, fixtures, and anything a schema validator or query tool consumes. Convert to an array to inspect or query, and back to lines to load or ship.

Frequently Asked Questions

What is the difference between JSONL, NDJSON, and JSON Lines?

In practice, nothing. All three name the same convention: one complete JSON value per line, newline-separated, with no enclosing array and no commas between records. This converter accepts any of them.

What happens if one line is malformed?

Conversion stops and the error names the exact line number and the parser message. A bad record is never skipped silently, because a dropped row in an export is far more expensive to discover later than a failed conversion now.

Are blank lines a problem?

No. Empty and whitespace-only lines are ignored, which is what streaming writers commonly leave at the end of a file.

Where does JSONL come from?

Log pipelines, BigQuery and Snowflake bulk loads, OpenAI batch and fine-tuning files, Elasticsearch bulk bodies, and database exports. It streams well because a reader can process one line at a time without holding the whole file in memory.

Related Tools