Skip to content
uencoder

JSONL

JSONL (JSON Lines) is equivalent to NDJSON: one JSON object per line, an alternative name for the same format.

Purpose

To provide the standard format for streaming JSON processing, synonymous with NDJSON.

Mechanism

Each line is a valid JSON value separated by \n. The only difference from NDJSON is that JSONL emphasizes one object per line (not arrays/scalars), but in practice the names are used interchangeably.

Use cases

  • Log files
  • Data pipeline streams
  • Paginated API responses
  • Database dumps

Examples

  • Input
    {"id":1}
    {"id":2}
    Output
    Two JSON objects, one per line

    Same as NDJSON

Common errors

Confusing JSONL with a JSON array
JSONL has no outer []; each line is independent

Related terms

Related tools

References