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

JSONL samples should be judged in the sizes people actually receive, upload, or export. These reference cards show the common shapes and settings to check before choosing a conversion target.

idnamevalue
001alpha42002beta18
rows1k rows

spreadsheet export

Checks headers, delimiters, quoting, and encoding.

idnamevalue
001alpha42002beta18
events10k lines

log stream

Checks append-friendly parsing and per-line recovery.

idnamevalue
001alpha42002beta18
unicodeUTF-8

international data

Avoids broken names, commas, and non-Latin text.

idnamevalue
001alpha42002beta18
large100 MB+

batch import

Checks streaming, memory use, and preview limits.

Reference dimensions are platform-style targets. Compatibility and format facts are verified from the linked online sources below.

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