Free JSON test files and sample generator
Lightweight, human-readable data interchange format. The default choice for API payloads and structured test data.
What is a .json file?
JSON: JavaScript Object Notation. JSON is the default wire format for web APIs: a nested structure of objects, arrays, strings and numbers. Because almost every service both produces and consumes it, a malformed JSON payload is one of the most common real-world failure modes there is.
Why generate a test JSON file?
- Load a large payload into a parser to measure memory use and find the point where it slows down.
- Feed deliberately broken JSON to an endpoint and confirm it returns a clean 400 rather than a stack trace.
- Seed a database, mock server or fixture directory with realistic customer records.
What you can put inside a .json file
You get 5 content options for JSON, so the file holds something meaningful rather than random padding: Key–value object, Array of records, Nested structure, Numeric dataset, Mixed data types. Pick several and they are merged into one file, with a section, sheet, slide or folder for each.
How a .json file is identified
A .json 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 JSON 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 JSON content
{
"id": 1,
"name": "Test User",
"active": true
}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
Open in any editor, or validate with `python -m json.tool file.json`, `jq . file.json`, or JSON.parse() in a browser console.
Media type application/json · extension .json · category Data
Generate a .json file → · questions about sizes, privacy or cost are answered on the site FAQ.
Frequently asked questions about JSON files
What identifies a .json 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 .json 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.
What can go inside the JSON file?
There are 5 content options for .json: Key–value object, Array of records, Nested structure, Numeric dataset, Mixed data types. Choose more than one and they are combined into a single file, a section, sheet, slide or folder per option, rather than downloaded separately.
Can I download several broken JSON files at once?
Yes, select more than one File Condition and you get one ZIP containing a .json per condition, each named after its condition.
Can the JSON file use UTF-16 or a byte-order mark?
Yes. .json 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 JSON file?
Open in any editor, or validate with python -m json.tool file.json, jq . file.json, or JSON.parse() in a browser console.