Free JSONL test files and sample generator
One JSON object per line, the streaming/log-friendly JSON format. Generate valid .jsonl / NDJSON files for testing data pipelines and log ingestion.
What is a .jsonl file?
JSONL: JSON Lines / NDJSON. JSON Lines (NDJSON) puts one complete JSON object on every line, which makes a file streamable: a consumer can process record one without loading record one million. It is the standard shape for log shipping, bulk APIs and ML datasets.
Why generate a test JSONL file?
- Test a streaming consumer that reads line by line and must not buffer the whole file.
- Check that a bulk-ingest endpoint handles a large record count and reports per-line errors.
- Verify a reader recovers when one line in the middle is malformed.
How a .jsonl file is identified
A .jsonl file has no signature at the start. A text format has no identifying leading bytes, so the extension and the reported media type are the only claims about it until a parser actually reads it, which is why validating uploads by extension alone is unsafe.
How the size lands on the exact byte
JSON has no comment syntax, so the padding is a real value in the document, a padding string that parses like any other field.
Negative testing with broken JSONL files
- Invalid. Identifiable, but wrong inside, so it fails during parsing.
- Corrupted. The leading bytes are destroyed. Same length as the valid file.
- Incomplete. Truncated part-way, so it is genuinely shorter.
- Empty. Chosen under Content rather than File Condition: valid structure, no data.
Which failure to reach for, and what to assert for each, is covered in how to make a corrupted file for testing. For upload limits and type checks see testing file upload validation, and for this format's encodings, UTF-16 and BOM test files.
Sample JSONL content
{"id":1,"name":"item_0","value":137}
{"id":2,"name":"item_1","value":274}This shows the shape of the file. Your download is generated fresh at the size you choose, so the values will differ.
How to open and verify the file
Validate every line with `jq -c . file.jsonl`, or read with `pandas.read_json(path, lines=True)`.
Media type application/x-ndjson · extension .jsonl · category Data
Generate a .jsonl file → · questions about sizes, privacy or cost are answered on the site FAQ.
Frequently asked questions about JSONL files
What identifies a .jsonl file?
Nothing at the start of the file does. A text format has no identifying leading bytes, so the extension and the reported media type are the only claims about it until a parser actually reads it, which is why validating uploads by extension alone is unsafe.
How can a .jsonl file be an exact number of bytes?
JSON has no comment syntax, so the padding is a real value in the document, a padding string that parses like any other field.
Can I download several broken JSONL files at once?
Yes, select more than one File Condition and you get one ZIP containing a .jsonl per condition, each named after its condition.
Can the JSONL file use UTF-16 or a byte-order mark?
Yes. .jsonl is a text format, so it can be generated as UTF-8, UTF-8 with a byte-order mark, UTF-16 LE or UTF-16 BE. The body is shortened before re-encoding so the finished file still lands on the exact size you asked for. Note that a UTF-16 file always has an even byte count.
How do I open or verify the JSONL file?
Validate every line with jq -c . file.jsonl, or read with pandas.read_json(path, lines=True).