Format Atlas

Data

What is JSONL?

JSON Lines (.jsonl) is a text format with one valid JSON value on each line. It is convenient for logs and incremental processing because a reader can handle records one at a time. The proposed application/jsonl media type is not standardized.

.jsonl · .ndjsonOne JSON value on each line

When to choose this format

  • Reading and writing records incrementally
  • Appending or combining text data with common tools

When to avoid this format

  • Storing one multi-line JSON document unchanged
  • Data that requires blank lines or comments

Common uses

  • Logs and records processed line by line
  • Streaming exchange of JSON records

Features

  • Uses UTF-8 encoding
  • Each line contains one complete JSON value; blank lines are not valid records
  • A line break separates values; a final line break is recommended

Advantages and disadvantages

Advantages

  • Records can be read incrementally
  • Works well with text-processing tools and stream compression

Disadvantages

  • Its structure differs from a regular JSON array
  • The JSON Lines media type is not standardized

Open and convert

How to open

Open the file in a text editor or a JSON Lines-aware tool. Validating each line as JSON makes it easier to identify the record containing a syntax error.

How to convert

To create a JSON array, collect the lines as array elements. To convert an array to JSON Lines, write each value on its own line. For large files, consider memory use during conversion.

Cautions

  • Keep each line as a complete JSON value, avoid blank lines, and use UTF-8 without a byte-order mark.
  • JSON Lines is not the same structure as a JSON array. Confirm the structure and media type expected by the receiving tool.

FAQ

Are JSONL and NDJSON the same?

Both names commonly refer to JSON values separated by line breaks. Check the extension and exact expectations of the receiving tool.

Related formats

Compare

References and specifications