Free JSONL sample files
One JSON value per line. The usual format for logs, data pipelines and machine-learning datasets. Download valid JSONL test files in 6 exact sizes, from 1 KB to 10 MB, each with a checksum.
- Extension
- .jsonl
- MIME type
- application/jsonl
- Kind
- Text
- Category
- Data
JSONL files by size
Every file below is a valid JSON Lines file of exactly the stated size. Open a file's page for its checksum and contents, and to preview it in your browser before downloading.
| File | Size | Contents | Download |
|---|---|---|---|
| 1 KB JSONL samplesample-jsonl-1kb.jsonl | 1 KB1,024 bytes | Lines: 3 | Download JSONL |
| 10 KB JSONL samplesample-jsonl-10kb.jsonl | 10 KB10,240 bytes | Lines: 31 | Download JSONL |
| 100 KB JSONL samplesample-jsonl-100kb.jsonl | 100 KB102,400 bytes | Lines: 302 | Download JSONL |
| 1 MB JSONL samplesample-jsonl-1mb.jsonl | 1 MB1,048,576 bytes | Lines: 3,075 | Download JSONL |
| 5 MB JSONL samplesample-jsonl-5mb.jsonl | 5 MB5,242,880 bytes | Lines: 15,324 | Download JSONL |
| 10 MB JSONL samplesample-jsonl-10mb.jsonl | 10 MB10,485,760 bytes | Lines: 30,582 | Download JSONL |
What is a JSONL file?
JSON Lines stores a sequence of records as separate JSON values, one on each line. A program can read, process and discard one line at a time, so files of any size can be handled in constant memory.
The format is widely used for structured logs, bulk database loads and the training and evaluation datasets used with language models. It is also known as newline-delimited JSON, with the extension .ndjson.
How to recognise a JSONL file
No signature bytes. JSONL files are identified by parsing their content.
| Extension | .jsonl |
|---|---|
| MIME type | application/jsonl |
| Also seen as | application/x-ndjson |
| Reference | jsonlines.org |
| Media type | None is registered; application/jsonl and application/x-ndjson are both in use |
| Record separator | Line feed |
| Constraint | A record cannot contain a raw line break |
What to test for
These are the behaviours that most often go wrong when software handles JSONL files.
- Passing the whole file to a standard JSON parser fails, because the file as a whole is not one JSON value.
- A blank line or a trailing comma on any line breaks strict readers, so decide how your importer treats them.
Strengths of JSONL
- Processed one record at a time in constant memory.
- New records can be appended without rewriting the file.
Limitations of JSONL
- Not valid JSON as a whole, so ordinary JSON tools reject it.
- No header or schema: every line must be self-describing.
Typical uses of JSONL test files
- Testing streaming parsers
- Loading datasets for machine-learning experiments
- Testing bulk import endpoints
- Checking log processors
Software that opens JSONL
- jq and command-line tools
- pandas, DuckDB and BigQuery
- Elasticsearch bulk API
- Model fine-tuning and evaluation tools
Specifications
Related
JSONL sample files: questions
- How is JSONL different from JSON?
- A JSON file is one value, usually an array. A JSONL file is many values separated by line breaks, which can be appended to and read as a stream.
- What is the MIME type of a JSONL file?
- The MIME type is application/jsonl. You will also meet application/x-ndjson in practice. The file extension is .jsonl.
- Is a sample JSONL file the same as a dummy or example JSONL file?
- Yes. Sample, test, dummy and example JSONL files are different names for the same thing: a JSONL file with known contents that stands in for a real one. Any file on this page will do wherever a tutorial or a test plan asks for a dummy JSONL file.