JSON to JSONL Converter.

Convert a JSON array to JSONL or NDJSON in one click. Each array item becomes one compact newline-delimited JSON record, ready to copy or download as .jsonl. Private, in your browser.

No signup · No uploads · Download .jsonl

JSON output

Convert JSON to JSONL online - free and private

A JSON to JSONL converter turns a normal JSON array into newline-delimited JSON. Paste an array above, and each item becomes one compact line. That output can be saved as .jsonl or .ndjson for logs, streaming tools, data imports, ML datasets, and ETL pipelines.

How to convert JSON to NDJSON in three steps

  1. Paste a JSON array into the converter, or load a local file.
  2. Convert to JSONL so every array item is serialized as one compact line.
  3. Copy or download the newline-delimited output as data.jsonl.

Array to newline-delimited JSON

JSONL and NDJSON do not use surrounding brackets or commas between records. Instead, every line is a complete JSON value. This tool strips pretty-print indentation and writes one compact object per line, which makes the output streamable, appendable, and easy for command-line tools to process.

What the conversion does

A JSON array:

[
  { "id": 1, "name": "Ada" },
  { "id": 2, "name": "Alan" }
]

becomes one compact record per line:

{"id":1,"name":"Ada"}
{"id":2,"name":"Alan"}

The brackets and the separating commas disappear, and each record is minified onto a single line. That last part is not cosmetic — it is what the format requires.

Why each record must be one line

The entire point of JSONL is that a consumer can read it line by line without parsing the whole file. That only works if one line is exactly one record.

Pretty-printed JSON spanning multiple lines would break it completely — a line-by-line reader would see a lone opening brace as its first record and fail immediately. So the converter strips the formatting automatically. A JSONL file is not meant to be pretty; it is meant to be streamed.

Who wants JSONL

  • OpenAI fine-tuning — training files must be JSONL, one example per line.
  • BigQuery and Redshift — newline-delimited JSON is the expected bulk-load format.
  • Elasticsearch — the bulk indexing API consumes exactly this.
  • Log pipelines — Fluentd, Logstash, and most shippers emit and expect it.

The common thread: all of them want to start processing record one without waiting for the file to finish, and all of them want to append without rewriting a closing bracket.

The trailing newline

There is a toggle for it because some strict parsers require one, and it is good practice regardless. A final newline means every record is terminated consistently — so a process appending the next line does not accidentally weld it onto the last one and corrupt both records.

Need to go the other way? The JSONL to JSON converter wraps the lines back into an array, validating each one and reporting the exact line if any fail.

Why use this JSON to JSONL tool?

It is fast, private, and built for the exact JSONL format. Use it when an API gives you a JSON array but your logging, analytics, ML, or import workflow expects newline-delimited JSON. Need the reverse? Use JSONL to JSON, or read what JSONL and NDJSON are.

FAQ

JSON to JSONL, answered.

How do I convert JSON to JSONL online? +

Paste a JSON array into the converter and press Convert JSON to JSONL. The tool parses the array, writes each item as one compact JSON value per line, and lets you copy or download the result as a .jsonl file.

Can I convert JSON to NDJSON too? +

Yes. JSONL and NDJSON both use newline-delimited JSON: one valid JSON value per line. The same output works as .jsonl or .ndjson for logs, streaming pipelines, BigQuery-style imports, and data tools.

Does it strip pretty-print formatting? +

Yes. Each record is serialized onto one compact line with no indentation or extra spaces. That creates valid newline-delimited JSON where every line can be parsed independently.

What JSON input shape works best? +

A JSON array is the best input. Each array item becomes one JSONL line. If you paste a single JSON object, the tool writes it as one line, which is useful for quick tests and appending a record.

Can I download a .jsonl file? +

Yes. After conversion, you can copy the newline-delimited output or download it as data.jsonl. You can also keep a final newline for command-line tools and streaming workflows.

Is my JSON uploaded when converting to JSONL? +

No. JSON to JSONL conversion runs entirely in your browser. Your JSON array is never uploaded, stored, logged, or seen by any server.

Why convert a JSON array to JSONL? +

Because a great deal of tooling expects one record per line rather than a single wrapped array — OpenAI fine-tuning files, BigQuery and Redshift bulk loads, Elasticsearch bulk indexing, and most log pipelines. JSONL streams and appends, so consumers can process record one without waiting for the file to finish downloading.

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

Nothing meaningful — they are three names for the same format: one complete JSON value per line, separated by newlines, with no enclosing array and no commas between records. You will see .jsonl and .ndjson as file extensions and they are interchangeable.

Should each line be minified? +

Yes, and it is required rather than optional. The entire format depends on one record occupying exactly one line, so pretty-printed JSON spanning multiple lines would break it — a parser reading line by line would see fragments. The converter strips the formatting automatically so every record becomes a single compact line.

Does the file need a trailing newline? +

It is good practice and some strict parsers require it, which is why there is a toggle for it. A final newline means every record is terminated consistently, so a tool appending the next line does not accidentally join it onto the last one.