Free JSON sample files

The standard data format of web APIs: objects, arrays, strings, numbers, booleans and null. Download valid JSON test files in 10 exact sizes, from 1 KB to 10 MB, each with a checksum.

Extension
.json
MIME type
application/json
Kind
Text
Category
Data

JSON files by size

Every file below is a valid JavaScript Object Notation 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.

JSON sample files by size
FileSizeContentsDownload
1 KB JSON samplesample-json-1kb.json 1 KB1,024 bytes Records: 2 Download JSON
5 KB JSON samplesample-json-5kb.json 5 KB5,120 bytes Records: 14 Download JSON
10 KB JSON samplesample-json-10kb.json 10 KB10,240 bytes Records: 29 Download JSON
25 KB JSON samplesample-json-25kb.json 25 KB25,600 bytes Records: 74 Download JSON
50 KB JSON samplesample-json-50kb.json 50 KB51,200 bytes Records: 148 Download JSON
100 KB JSON samplesample-json-100kb.json 100 KB102,400 bytes Records: 297 Download JSON
500 KB JSON samplesample-json-500kb.json 500 KB512,000 bytes Records: 1,483 Download JSON
1 MB JSON samplesample-json-1mb.json 1 MB1,048,576 bytes Records: 3,029 Download JSON
5 MB JSON samplesample-json-5mb.json 5 MB5,242,880 bytes Records: 15,103 Download JSON
10 MB JSON samplesample-json-10mb.json 10 MB10,485,760 bytes Records: 30,143 Download JSON

More JSON samples

Hand-designed files with realistic content or a specific edge case.

Curated JSON sample files
FileSizeContentsDownload
Sample users JSON (array of 50 objects)sample-users.json 14.3 KB14,664 bytes Records: 50 Download JSON
Nested JSON with every value typesample-nested-config.json 829 B829 bytes Root type: Object Download JSON

What is a JSON file?

JSON represents structured data as text using two containers, objects with named members and ordered arrays, and four kinds of value: strings, numbers, booleans and null. It grew out of JavaScript but is now language-independent.

The grammar is small and strict. There are no comments and no trailing commas, and strings must use double quotes. That strictness is what makes JSON safe to exchange between unrelated systems.

How to recognise a JSON file

No signature bytes. JSON files are identified by parsing their content.

Extension.json
MIME typeapplication/json
StandardRFC 8259 and ECMA-404
EncodingUTF-8 for interchange
CommentsNot allowed
NumbersDecimal; precision depends on the parser

What to test for

These are the behaviours that most often go wrong when software handles JSON files.

Strengths of JSON

  • Parsed natively by browsers and supported by every language.
  • A small, strict grammar with no room for ambiguity.

Limitations of JSON

  • No comments, dates or binary data.
  • A whole document must normally be parsed at once, which is costly for large files.

Typical uses of JSON test files

  • Mocking API responses
  • Testing parsers, schema validators and serialisers
  • Load-testing endpoints with large payloads
  • Seeding front-end components with data

Software that opens JSON

  • Every programming language and web browser
  • jq, Postman and curl
  • Document databases such as MongoDB and PostgreSQL JSONB

Specifications

Related

JSON sample files: questions

What is the structure of the sample JSON?
An object with a "records" array. Each record has strings, numbers, a boolean, a nullable field, a nested object and an array, so most deserialiser paths are exercised.
Why is there a "padding" field?
JSON has no comments, so a final string member is used to bring each sized file to its exact byte count.
What is the MIME type of a JSON file?
The MIME type is application/json. The file extension is .json.
Is a sample JSON file the same as a dummy or example JSON file?
Yes. Sample, test, dummy and example JSON files are different names for the same thing: a JSON 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 JSON file.