📋 JSON files
Test JSON files
102,450 bytes
application/json
10,292 bytes
application/json
10,485,830 bytes
application/json
1,048,578 bytes
application/json
5,243,008 bytes
application/json
About JSON files
JSON test files from 10 KB to 10 MB are available free. They hold array data containing Japanese text, so they exercise a structure close to a real API response.
Because JSON validity cannot be determined without parsing the entire document, the cost of "read it all just to validate" grows with file size. These files help you decide when to switch to a streaming parser.
Typical uses
- Testing how a REST API handles a large response
- Benchmarking JSON parsers and serialisers
- Observing front-end behaviour when rendering a large dataset
- Checking that nesting depth and large-integer precision survive intact
Related reference and articles
📖 Where people get stuck
JSON files from 10 KB to 100 MB, for checking API request-size limits and parser behaviour. The structure is deliberately simple. To try deep nesting or huge arrays, build those yourself with the caveats below in mind.
| Case | What happens | What to do |
|---|---|---|
| Large integers lose their low digits | A JavaScript Number is a double, so integers are exact only up to 253−1. A 19-digit identifier is rounded silently. |
Send identifier-like values as strings. Where the API cannot change, pull them out before numeric conversion using BigInt or a parser option. |
| A 100 MB JSON blows the memory limit | json_decode() and JSON.parse() materialise the whole document at once, and the resulting object is several times the size of the text. |
Process large input element by element with a streaming parser. Often simpler operationally: cap the request size at the API and return 413 so the client splits it. |
| A duplicated key goes unnoticed | The JSON spec does not forbid duplicate keys, and most parsers silently keep the last one. A bug in the producer passes straight through. | Validate against a JSON Schema when the shape is known. To simply inspect the structure, formatting it with the JSON formatter and diffing is quicker. |
You can put a charset on Content-Type: application/json, but the JSON spec makes UTF-8 the default. Some parsers reject UTF-16 or a leading BOM, so stripping the BOM before handing the text over avoids a class of incident.