Data sample files
JSON, XML and JSON Lines files with structured records for testing parsers, APIs and data pipelines.
Formats in this category
| Format | What it is | Sizes |
|---|---|---|
| JSON sample files.json application/json | The standard data format of web APIs: objects, arrays, strings, numbers, booleans and null. | 1 KB to 10 MB |
| XML sample files.xml application/xml | Structured, self-describing documents built from nested elements and attributes. | 1 KB to 10 MB |
| JSONL sample files.jsonl application/jsonl | One JSON value per line. The usual format for logs, data pipelines and machine-learning datasets. | 1 KB to 10 MB |
| CSV sample files.csv text/csv | Tabular data as plain text, one record per line. The universal import and export format. | 1 KB to 10 MB |
| YAML sample files.yaml application/yaml | Human-friendly data serialisation that relies on indentation. The format of most infrastructure configuration. | 1 KB to 1 MB |
About these files
Structured data files are how systems talk to each other. The same records may arrive as JSON from an API, XML from a partner or JSON Lines from a pipeline, and each format has its own way of failing.
These samples carry the same fictional customer records across formats, which makes them handy for testing converters as well as parsers.
Ready-made samples
Hand-designed files with realistic content or a specific edge case.
| File | Format | Size | Contents | Download |
|---|---|---|---|---|
| Sample users JSON (array of 50 objects)sample-users.json | JSON | 14.3 KB14,664 bytes | Records: 50 | Download JSON |
| Nested JSON with every value typesample-nested-config.json | JSON | 829 B829 bytes | Root type: Object | Download JSON |
| Sample product catalogue XML with namespaces and CDATAsample-product-catalog.xml | XML | 1.07 KB1,100 bytes | Features: Attributes, entities, CDATA, comment, processing instruction, empty element | Download XML |
| Sample RSS 2.0 feedsample-rss-feed.xml | XML | 2.39 KB2,451 bytes | Items: 5 | Download XML |
Popular downloads by size
Jump straight to a file. Every size is exact to the byte.
Or browse every format at one size: 1 KB, 5 KB, 10 KB, 25 KB, 50 KB, 100 KB, 500 KB, 1 MB, 5 MB, 10 MB.
What to test
- API testing
Payloads and attachments for testing REST endpoints that receive, return or transform files.
- File parser testing
Well-formed files and deliberate edge cases for testing code that reads CSV, JSON, XML, PDF and more.
- Performance testing
Large, predictable inputs for measuring throughput, memory use and processing time.
Related categories
Data files: questions
- Do JSON and XML samples of the same size hold the same records?
- They draw on the same people, but XML is more verbose, so an XML file holds fewer records than a JSON file of the same size.