Convert JSONL to JSON

Most tools that say "JSON" mean a single array. A JSONL file is not that, and handing one to a standard parser produces an error on line two. This converter collects the lines into a proper JSON array you can pass anywhere.

  • Runs in your browser
  • No signup
  • No upload
  • Free

JSONLJSON

Runs on your device
Options

Reading JSONL

Writing JSON

Work with Parquet as well?See ParquetReader with ParquetReader — opens Parquet files directly.
What happens

How this converter handles JSONL to JSON

  1. Reads each line as an independent JSON object and skips blank lines.
  2. Reports and skips malformed lines rather than failing the whole file.
  3. Collects the records into a single JSON array, preserving order.
  4. Formats the output with your choice of indentation, or minifies it.
Format differences

JSONL vs JSON

One JSON object per line, built for streaming and appending. Nested, self-describing records that every language can read.

JSONLJSON
Type informationStrings, numbers, booleans, nullStrings, numbers, booleans, null
StructureOne nested object per lineNested objects and arrays
CompressionNoneNone
Typical file sizeSlightly under JSONLargest — keys repeat on every record
SchemaImplicit, per lineImplicit, per record
Human-readableYes, one record at a timeYes, though verbose
Tool supportLog pipelines, LLM training sets, BigQueryEvery language, natively
Worth knowing

What to watch out for

The whole file ends up in memory

A JSON array cannot be written incrementally the way JSONL can be, so the full document is assembled before download. Very large JSONL files are better left as they are.

Indentation multiplies the size

Pretty-printing with four spaces can add a large fraction to the file size. Choose minified output if the result is going to a machine.

Truncated lines are dropped

A partial final record — common in copied log files — is skipped and counted in the warnings.

When you need this

Common reasons to convert JSONL to JSON

Feeding a tool that requires a JSON array

Many APIs, config loaders and import dialogs accept nothing else.

Reading a small export by eye

Indented JSON is far easier to scan than dense single lines.

Loading into a language without a streaming reader

A plain array works with the standard library everywhere.

FAQ

JSONL to JSON questions

Is my file uploaded?
No. The conversion runs in your browser using WebAssembly and JavaScript. The file is read from your disk into a Web Worker, converted in memory, and handed back as a download. It is never sent to a server, so there is nothing for us to store, log or leak.
Why is my JSONL file rejected by a JSON parser?
Because JSONL is a sequence of separate documents, not one document. There is no enclosing array and no commas between records, so a standard parser stops after the first value.
What happens to invalid lines?
They are skipped and counted, with the first failing line number reported in the warnings.
Can I minify the output?
Yes — choose "Minified" in the formatting option.
Is record order preserved?
Yes, the array follows the original line order.