Sample files for file size limit testing
Files built to exact byte counts for testing limits precisely, including the boundary itself.
A size limit is a boundary, and boundaries are tested at the edge. A file that is "about 10 MB" cannot tell you whether a limit is enforced as greater-than or greater-than-or-equal, or whether it counts megabytes as 1,000,000 or 1,048,576 bytes.
Every sized sample here is exact to the byte. A 10 MB file is 10,485,760 bytes: no more and no less.
Recommended files
| File | Size | Why this one | Download |
|---|---|---|---|
| 100 KB BIN samplesample-bin-100kb.bin | 100 KB102,400 bytes | 102,400 bytes: the Express default body limit | Download BIN |
| 1 MB BIN samplesample-bin-1mb.bin | 1 MB1,048,576 bytes | 1,048,576 bytes: nginx and Spring Boot defaults | Download BIN |
| 5 MB BIN samplesample-bin-5mb.bin | 5 MB5,242,880 bytes | Over the PHP and Vercel Functions defaults | Download BIN |
| 10 MB BIN samplesample-bin-10mb.bin | 10 MB10,485,760 bytes | API Gateway payload limit | Download BIN |
| Empty file (0 bytes)empty-file.txt | 0 B0 bytes | The minimum: zero bytes | Download TXT |
Checklist
Find out what the limit measures
File size, request body size and decoded size are three different numbers. Check which one each layer of your stack enforces.
Test below, at and above
Use the sizes on either side of the limit, and the exact size if one is published.
Check every layer
A proxy, a web server, a framework and the application code can each have a limit. The smallest one wins, often with the least helpful error.
Check the error
An oversized upload should produce a clear message, ideally before the whole file has been sent.
Check decimal against binary
A 1,048,576-byte file is over a limit defined as 1,000,000 bytes. Know which your limit means.
Guides
- How to test file size limits
Where upload limits live, what the common defaults are, and how to test a boundary to the byte.
- How to create test files of any size
Commands for Linux, macOS and Windows that produce a file of an exact byte count, and when to use each.
- How to test file upload: a complete checklist
A test plan for upload forms and endpoints, with the right sample file for every case.
Related use cases
Frequently asked questions
- Are the file sizes exact?
- Yes. Each sized file is built to its exact byte count, and that count is printed on the download page along with a SHA-256 checksum.
- I need a size you do not offer. What should I do?
- Create one locally. The guide to creating test files shows one-line commands for Linux, macOS and Windows that produce a file of any size.
Test plan architecture and assertion matrix for sample files for file size limit testing
A thorough file size 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 ID | Scenario in file size testing | Input fixture | Expected system outcome |
|---|---|---|---|
| TC-FILE-01 | Baseline small payload acceptance | 1 KB – 100 KB valid fixture from Formats | HTTP 200/201; stored byte count and SHA-256 match /checksums.txt |
| TC-FILE-02 | Gateway / reverse-proxy ceiling check | 1 MB, 10 MB, and 20 MB sized fixtures from Sizes | Exact threshold enforced; oversize payload returns HTTP 413 Payload Too Large |
| TC-FILE-03 | Extension vs. magic-byte mismatch | wrong-extension-png-as-jpg.jpg from Broken Files | Validator detects 89 50 4E 47 PNG header and rejects spoofed .jpg extension |
| TC-FILE-04 | Truncated stream / unexpected EOF | Truncated PDF or JPEG from Broken Files | Parser catches missing trailer/EOI marker and returns HTTP 422 without leaking stack traces |
Automating file size 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 size 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.