ZERO-UPLOAD SANDBOX
.jsonl .ndjson Tier 1 · Deep AST Parser

JSON Lines / Newline-Delimited JSON

Streaming line-oriented text format where every newline-separated record is a standalone UTF-8 JSON value—standard for LLM fine-tuning (SFT/DPO) datasets and batch APIs.

Line-oriented framing allows O(1) memory streaming and parallel chunk splitting, unlike monolithic JSON arrays. Watch for UTF-8 BOMs and >53-bit integer precision loss in JS.

MIME Types application/jsonl, application/x-ndjson
Byte Endianness text
Container Family text
0xFF

Drop any .jsonl file (even 100 GB+) to inspect locally

Reads tiny File.slice() header/footer pages in a sandboxed Web Worker · 0 Bytes Uploaded

Binary Signature & Wire Layout

.jsonl Magic Bytes & Header Offset Map

Note: JSONL does not rely on a fixed static magic byte sequence at offset 0x00; parsers validate structural framing defined below.
Byte Offset Length Data Type Field Name Engineering Description
Line 1 var utf8_json record_0 First standalone JSON object terminated by LF (0x0A)
Upload Gateway & AppSec Advisory

.jsonl Security & Polyglot Risk Matrix

Risk Level: low
Arbitrary Code / Macros
NO (Inert Data)
Pickle Deserialization
SAFE (No Pickle VM)
XML External Entity (XXE)
NONE
Polyglot Prepend Risk
LOW (Strict 0x00 Magic)
Backend Upload Validation Recommendation

Enforce max single-line byte length (e.g. 16 MB) before buffering newline splits to prevent memory exhaustion from newline-free gigabyte files.

Compiler-Verified Reference Code

Read .jsonl Header & Metadata Without Heavy Dependencies

import json, sys
with open(sys.argv[1], "r", encoding="utf-8-sig") as f:
    first = json.loads(f.readline())
    print("First JSONL keys:", list(first.keys()))
CI/CD & Unit Test Fixtures

Deterministic .jsonl Sample Files & Edge Cases

Open Full .jsonl Sample Matrix & Mutator →
minimalexpect: valid

minimal-sft.jsonl

3-line UTF-8 JSON Lines fine-tuning dataset with LF delimiters.

↓ Download (308 B)
SHA-256: 85b7b589f6426c997e2e17ca60dc35cf0285c8408f1141b39ef574a13de69918
Exact: 308 bytes
curl -fsSL https://fileformat.co/fixtures/v1/jsonl/minimal-sft.jsonl -o minimal-sft.jsonl \
  && echo "85b7b589f6426c997e2e17ca60dc35cf0285c8408f1141b39ef574a13de69918  minimal-sft.jsonl" | shasum -a 256 -c
realisticexpect: valid

multilingual-rag-chunks.jsonl

10-line JSONL stream featuring CJK/Japanese text, ZWJ emoji sequences, nested arrays, and nullable fields.

↓ Download (2.5 KB)
SHA-256: 20fb244b631707aecb497b1c320f5fde5504679044c7e799326c686bcac6d0a5
Exact: 2,575 bytes
curl -fsSL https://fileformat.co/fixtures/v1/jsonl/multilingual-rag-chunks.jsonl -o multilingual-rag-chunks.jsonl \
  && echo "20fb244b631707aecb497b1c320f5fde5504679044c7e799326c686bcac6d0a5  multilingual-rag-chunks.jsonl" | shasum -a 256 -c
edge-caseUTF-8 BOM + BigInt + Malformed Lineexpect: parser_error

bom-bigint-malformed.jsonl

Starts with EF BB BF BOM, contains 9007199254740993 (> JS Number.MAX_SAFE_INTEGER), and ends with a truncated JSON record.

↓ Download (210 B)
SHA-256: 7b279351978bf216b68fca66051d03953d625b0555450c3f8c59051e0b8f0568
Exact: 210 bytes
curl -fsSL https://fileformat.co/fixtures/v1/jsonl/bom-bigint-malformed.jsonl -o bom-bigint-malformed.jsonl \
  && echo "7b279351978bf216b68fca66051d03953d625b0555450c3f8c59051e0b8f0568  bom-bigint-malformed.jsonl" | shasum -a 256 -c

Related Specifications & Alternatives