Sample files for parser and importer testing

Well-formed files and deliberate edge cases for testing code that reads CSV, JSON, XML, PDF and more.

A parser is tested by what it is fed. Clean input shows that the common path works; awkward but valid input shows whether the parser follows the format or merely an optimistic idea of it.

The curated library contains files built around the features that hand-written parsers most often mishandle: quoted CSV fields, byte order marks, XML namespaces and CDATA, deeply nested JSON and multipart email.

Recommended files

FileSizeWhy this oneDownload
CSV with quoted fields, embedded commas and line breakssample-csv-quoted-fields.csv324 B324 bytesRFC 4180 quoting rulesDownload CSV
CSV with a UTF-8 byte order mark and non-ASCII textsample-csv-utf8-bom.csv193 B193 bytesByte order markDownload CSV
Sample product catalogue XML with namespaces and CDATAsample-product-catalog.xml1.07 KB1,100 bytesNamespaces, CDATA and entitiesDownload XML
Nested JSON with every value typesample-nested-config.json829 B829 bytesAll JSON types and deep nestingDownload JSON
10 MB CSV samplesample-csv-10mb.csv10 MB10,485,760 bytesVolume testDownload CSV
5 MB JSONL samplesample-jsonl-5mb.jsonl5 MB5,242,880 bytesStreaming testDownload JSONL
Sample CSV file with 10,000 rowssample-csv-10000-rows.csv818 KB837,484 bytesKnown row count to assert againstDownload CSV
Sample XLSX with multiple sheets (3 sheets)sample-xlsx-multiple-sheets.xlsx8.21 KB8,407 bytesThree sheets and cross-sheet formulasDownload XLSX
Corrupted ZIP file for testing (CRC error)sample-zip-corrupted.zip5.19 KB5,316 bytesEntry that fails its CRC-32 checkDownload ZIP

Checklist

  1. Parse the clean file

    Confirm record counts and a few known values. Each download page states how many records a file holds.

  2. Parse the edge cases

    Quoted fields, embedded line breaks, a byte order mark, different delimiters, non-ASCII text.

  3. Scale up

    Move to 1 MB, then 10 MB. Watch memory as well as time: reading everything at once is the usual fault.

  4. Truncate deliberately

    Cut a file in half and check that the parser reports an error instead of returning partial data as if it were complete.

Guides

Related use cases

Frequently asked questions

How do I make a truncated file?
Use head -c with a byte count, for example head -c 5000 sample-json-10kb.json > truncated.json. The result is invalid JSON by construction.

Build a fixture for your parser

Create synthetic records with quoted fields, Unicode, missing values or nested JSON. Preview the output and check the actual bytes before downloading.

Open the CSV, JSON and TSV test data generator →

Test plan architecture and assertion matrix for sample files for parser and importer testing

A thorough file parser testing workflow separates positive functional verification (confirming well-formed inputs succeed and preserve their SHA-256 checksum) from negative boundary verification (confirming oversized, truncated, or mislabelled inputs fail with structured diagnostic codes).

Test case IDScenario in file parser testingInput fixtureExpected system outcome
TC-FILE-01Baseline small payload acceptance1 KB – 100 KB valid fixture from FormatsHTTP 200/201; stored byte count and SHA-256 match /checksums.txt
TC-FILE-02Gateway / reverse-proxy ceiling check1 MB, 10 MB, and 20 MB sized fixtures from SizesExact threshold enforced; oversize payload returns HTTP 413 Payload Too Large
TC-FILE-03Extension vs. magic-byte mismatchwrong-extension-png-as-jpg.jpg from Broken FilesValidator detects 89 50 4E 47 PNG header and rejects spoofed .jpg extension
TC-FILE-04Truncated stream / unexpected EOFTruncated PDF or JPEG from Broken FilesParser catches missing trailer/EOI marker and returns HTTP 422 without leaking stack traces

Automating file parser testing in CI/CD pipelines

To keep automated runs deterministic and fast, commit your small sub-100 KB fixtures directly to your repository and synthesize larger 10 MB to 1 GB stress fixtures on demand using our in-browser generator or the reproducible local commands on Methodology. When testing tabular or relational data pipelines during file parser testing, pair binary container checks with our 100-row and 1,000-row synthetic datasets so you can assert exact row counts and column aggregations after ingestion.