file in abyss
Back to formats

Data

NDJSON Newline Delimited JSON

Newline Delimited JSON is a data format commonly identified by .ndjson, .jsonl. Use the listed signatures, MIME types, and structure notes to validate files beyond the extension.

Extensions .ndjson, .jsonl
MIME application/x-ndjson, application/jsonl

Magic numbers

Analyze your file
offset 0 Newline Delimited JSON leading signature
7B
{

Structure

  1. JSON value per line
  2. Newline separators

Caveats

  • Do not trust the extension alone. Check the MIME type, the first bytes such as 7B, and format-specific structure when possible.
  • Container formats and damaged files can share the same opening bytes, so deeper validation may be required for production upload, preview, or conversion flows.

Detection example

SIGNATURE = bytes.fromhex("7b")
OFFSET = 0

def is_ndjson(path: str) -> bool:
    with open(path, "rb") as f:
        f.seek(OFFSET)
        head = f.read(len(SIGNATURE))
    return head == SIGNATURE

Practical usage

Use cases

Newline Delimited JSON is used for data exchange, imports, exports, parser testing, and validation workflows. Encoding, delimiters, versions, and container structure often change implementation behavior.

Common detection mistakes

  • The .ndjson / .jsonl extension alone does not prove the file contents. Upload and conversion flows should combine extension, MIME type, leading bytes, and format-specific structure checks.
  • Newline Delimited JSON can start with signatures such as 7B, but related containers and damaged files may require additional validation.

Security notes

Untrusted input is not safe just because the format was detected. Account for parser exceptions, large files, unexpected encodings, and external references.

Using samples

11 samples help test leading-byte detection, parser errors, upload limits, and download behavior.

Sample files

11 / 11 files
Sample Traits Size Source / license / SHA-256
Data

Blue Sky NDJSON

Blue Sky NDJSON is a Newline Delimited JSON sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

01-blue-sky.ndjson
Type Sample
Small file
156 B
SHA-256 8d7276a1905675b2c4c3408161571e16d7fdcf3fdbf489cf9210b778e404217a
Download
Data

Flower Garden NDJSON

Flower Garden NDJSON is a Newline Delimited JSON sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

02-flower-garden.ndjson
Type Sample
Small file
362 B
SHA-256 64a8414758a1c618180e343e7673d20f271e469c8ccbdb129fd552999cf1685a
Download
Data

Navy Blue Sky NDJSON

Navy Blue Sky NDJSON is a Newline Delimited JSON sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

03-navy-blue-sky.ndjson
Type Sample
Small file
519 B
SHA-256 d667e600fe8e879f57c6718162c6c437506f19545b0dda322ab955cf4b0d469b
Download
Data

Nature of the Sky NDJSON

Nature of the Sky NDJSON is a Newline Delimited JSON sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

04-nature-sky.ndjson
Type Sample
Small file
660 B
SHA-256 35bb71f13fe7599219a4c6aa2817da266b1b412f2c9e2fb6ba0faa12a2006d83
Download
Data

Sky Landscape NDJSON

Sky Landscape NDJSON is a Newline Delimited JSON sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

05-sky-landscape.ndjson
Type Sample
Small file
910 B
SHA-256 621e500353508a74dc3f718738eae9ee8cffadd7aab152c4d88caeb61ef189ef
Download
Data

Starry Sky NDJSON

Starry Sky NDJSON is a Newline Delimited JSON sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

06-starry-sky.ndjson
Type Sample
Small file
990 B
SHA-256 37c19e64aff8b6b4a91645f79761e28a5007f74a81e381828f1b01a107d9cfc9
Download
Data

Blue Night Sky NDJSON

Blue Night Sky NDJSON is a Newline Delimited JSON sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

07-blue-night-sky.ndjson
Type Sample
1.1 KB
SHA-256 34467b79eee3ed7184243cdf8a764937d213c7809def48448f2e0e24f90d01f2
Download
Data

Hibiscus Flower NDJSON

Hibiscus Flower NDJSON is a Newline Delimited JSON sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

08-hibiscus-flower.ndjson
Type Sample
1.5 KB
SHA-256 1d50dcf715c4fe621060ee607ce86518633e0ad2ffcb456d7bf28cea30bb0411
Download
Data

Arctic Sky NDJSON

Arctic Sky NDJSON is a Newline Delimited JSON sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

09-arctic-sky.ndjson
Type Sample
1.5 KB
SHA-256 041153e643f792c655c8f6312f481bd6570b4b9c8ac73f0263697f9ebf2fc7c3
Download
Data

Sunset Rays NDJSON

Sunset Rays NDJSON is a Newline Delimited JSON sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

10-sunset-rays.ndjson
Type Sample
1.7 KB
SHA-256 795d3f86a48a48d3cb46d9a65d791673017c54e4b11bdd84f4b5a15889af3b1d
Download
Data

NASA Blue Marble NDJSON

NASA Blue Marble NDJSON is a Newline Delimited JSON sample based on NASA Image and Video Library. It can be used to test downloads, parsers, previews, and file type detection.

nasa-blue-marble-2012-east.ndjson
Type Sample
2.4 KB
SHA-256 e108e76333f8782f2f3d7636a7245b5ee0340132e6057c08e7ec6d28d7b991cc
Download

Frequently asked questions

What is the magic number (file signature) of Newline Delimited JSON?

Newline Delimited JSON files begin with the byte signature 7B ("{"). Detect the format by reading these leading bytes rather than trusting the file extension alone.

What is the MIME type of Newline Delimited JSON?

The MIME type for Newline Delimited JSON is application/x-ndjson, application/jsonl.

What file extension does Newline Delimited JSON use?

Newline Delimited JSON files use the .ndjson, .jsonl extension. The extension is a convention only and does not guarantee the file contents, so combine it with signature and structure checks.

Related formats