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.