vibedonaldsvibedonalds.com
Term

JSONL

JSON Lines — a file format where each line is a self-contained JSON object. Used universally for LLM training data, evaluation sets, and batch inference inputs. One example per line, no top-level array, easy to stream.

Background

JSONL (JSON Lines, sometimes written as NDJSON, newline-delimited JSON) is a text format where each line of a file is one complete, independent JSON value, almost always an object, terminated by a newline. There is no enclosing array and no commas between records; the file itself is not valid JSON, but every individual line is. A three-record file is literally three lines, e.g. {"id":1,"role":"user"} then {"id":2,"role":"assistant"} then {"id":3,"role":"user"}. This structure makes JSONL streamable and append-friendly: you can read one record at a time without loading the whole file into memory, append a new record by writing a single line, and split a large dataset across machines by cutting on line boundaries. Corruption in one line does not invalidate the rest of the file. Those properties are why JSONL is the default for machine-learning workflows: training and fine-tuning datasets, evaluation sets, and inference request batches are typically shipped as JSONL, and LLM providers commonly require it for batch and fine-tuning uploads. It is also the standard shape for streaming API responses and for log pipelines. The main caveat is that each line must be self-contained single-line JSON, so any newlines inside string values must be escaped as \n, and tooling should read line-by-line rather than parsing the file as a whole. When building AI systems you will read, write, and validate JSONL constantly.