JSON to JSONL
Splits a JSON array into newline-delimited JSON (NDJSON / JSONL), writing each object as a compact, self-contained line ideal for streaming pipelines, log ingestion, and machine-learning dataset formats that expect one record per line. A single non-array object is wrapped in a single-line output so the tool handles both shapes without extra configuration. Paste, convert, and download a .jsonl file — no uploads, no sign-in required.
JSON
JSONL
What is JSON to JSONL Converter?
BigQuery, Redshift, and most large-scale data ingestion pipelines do not want a JSON array — they want newline-delimited JSON (JSONL), one record per line, so they can process the file in parallel without parsing the entire document first. OpenAI's fine-tuning API requires JSONL. Structured logging pipelines write JSONL because lines can be appended without modifying the file structure. Kafka producers emit one JSON object per message, not wrapped arrays. This converter takes a JSON array and writes each element as a compact JSON object on its own line with no surrounding brackets and no commas between entries. The output is immediately loadable with pd.read_json("file.jsonl", lines=True) in pandas, BigQuery's JSON load job, or any tool expecting the NDJSON format. Choose LF or CRLF line endings for cross-platform compatibility.
How to Use
- 1
Paste Your JSON Array
Paste a JSON array of objects into the input panel. Each object in the array will become one line in the JSONL output. Single objects and nested arrays are also handled.
- 2
Set JSONL Options
Choose whether to minify each line (recommended) or pretty-print, set the line ending style (LF or CRLF), and optionally add a newline at the end of the file for POSIX compatibility.
- 3
Convert to JSONL
Click "Convert to JSONL". Each array element is serialised as compact JSON on its own line, separated by newline characters — no commas between lines, no surrounding brackets.
- 4
Download or Copy the JSONL
Download the .jsonl file for use with BigQuery, Redshift, LLM training pipelines, or Kafka producers — or copy individual lines for stream testing.
Common Use Cases
LLM Fine-Tuning Datasets
Convert JSON arrays of training examples into JSONL format for fine-tuning OpenAI, Llama, or Mistral models — the JSONL format is the standard input for most LLM training and fine-tuning pipelines.
Log Streaming & Appending
JSONL is the standard format for structured logging because new records can be appended line by line without re-parsing the entire file. Convert batch JSON arrays to JSONL for streaming log pipelines.
BigQuery & Redshift Bulk Load
Google BigQuery and Amazon Redshift both accept JSONL (newline-delimited JSON) as a bulk import format. Convert your JSON array exports to JSONL before uploading to these platforms.
Kafka & Event Stream Ingestion
Message streaming platforms like Kafka and Kinesis process one event per message. Convert a JSON array of events to JSONL so each line can be published as an individual message to the stream.
Conversion Examples
JSON Array → JSONL (One Object Per Line)
Each object in the array becomes a single compact line in the JSONL output.
Input JSON
[
{"id": 1, "name": "Alice", "score": 95},
{"id": 2, "name": "Bob", "score": 87},
{"id": 3, "name": "Carol", "score": 91}
]Output CSV
{"id":1,"name":"Alice","score":95}
{"id":2,"name":"Bob","score":87}
{"id":3,"name":"Carol","score":91}LLM Fine-Tuning Format
Convert instruction-response pairs to JSONL for OpenAI fine-tuning.
Input JSON
[
{"prompt": "What is JSON?", "completion": "JSON is a lightweight data format."},
{"prompt": "What is YAML?", "completion": "YAML is a human-readable config format."}
]Output CSV
{"prompt":"What is JSON?","completion":"JSON is a lightweight data format."}
{"prompt":"What is YAML?","completion":"YAML is a human-readable config format."}