Data formatsince 2013

.jsonlJSON Lines

A newline-delimited JSON format for logs, events, datasets, and streaming records.

Extensions
.jsonl, .ndjson
MIME
application/jsonl, application/x-ndjson, application/json-seq
Standard
JSON Lines / newline-delimited JSON convention
Released
2013

About this format

JSONL stores one valid JSON value per line. That makes it easy to append, stream, split, and recover from a bad record without loading a whole JSON array.

Use JSONL for logs, analytics events, ML datasets, and batch imports. Use CSV for simple flat tables.

Real-world samples & file sizes

Four real JSONL files from public repositories. Each preview is generated from valid one-line JSON records, showing top-level keys and the first records instead of a generic code icon.

GSM8K Messages JSONL sample preview for 1000 lines / 2 keys
nested records1000 lines / 2 keys

GSM8K Messages JSONL

A real JSONL sample where each record stores nested chat messages and a ground-truth answer.

2.41 MB jsonl.jsonl
Spec-Bench Questions JSONL sample preview for 480 lines / 3 keys
benchmark480 lines / 3 keys

Spec-Bench Questions JSONL

A benchmark question stream with category labels and multi-turn prompt arrays.

682 KB jsonl.jsonl
Spec-Bench · Apache-2.0
Text Generation Pairs JSONL sample preview for 142 lines / 2 keys
input/output142 lines / 2 keys

Text Generation Pairs JSONL

A compact JSONL file with one input and one output string per line.

16 KB jsonl.jsonl
ModelForge · BSD-3-Clause
Summary Pairs JSONL sample preview for 100 lines / 2 keys
summaries100 lines / 2 keys

Summary Pairs JSONL

A summarization dataset where each line contains an article and its summary.

40 KB jsonl.jsonl
ModelForge · BSD-3-Clause

Pros

  • +Streaming-friendly
  • +Supports nested records
  • +Easy to append and split by line

Cons

  • Larger than CSV for flat tables
  • Not a single valid JSON array
  • MIME type conventions vary

JSONL vs other formats

vsSizeQualityNote
CSVJSONL is usually largerJSONL supports nested dataCSV is better for flat spreadsheet data.
JSONSimilar data sizeJSONL streams betterA JSON array is easier for small API payloads.

Where it works

Operating systems
  • Any text editor
  • command-line tools
  • data pipelines
Browsers
  • Browsers parse with app code
  • not a native visual format
Apps
  • jq
  • Python
  • Node.js
  • BigQuery loaders
  • ML dataset tools

Frequently asked questions

Is JSONL valid JSON?
Each line is valid JSON, but the whole file is not a single JSON array.
When should I use JSONL?
Use it when records are independent, append-only, streamed, or too large to load as one JSON document.

Sources

Other data formats