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

FileSizeWhy this oneDownload
100 KB BIN samplesample-bin-100kb.bin100 KB102,400 bytes102,400 bytes: the Express default body limitDownload BIN
1 MB BIN samplesample-bin-1mb.bin1 MB1,048,576 bytes1,048,576 bytes: nginx and Spring Boot defaultsDownload BIN
5 MB BIN samplesample-bin-5mb.bin5 MB5,242,880 bytesOver the PHP and Vercel Functions defaultsDownload BIN
10 MB BIN samplesample-bin-10mb.bin10 MB10,485,760 bytesAPI Gateway payload limitDownload BIN
Empty file (0 bytes)empty-file.txt0 B0 bytesThe minimum: zero bytesDownload TXT

Checklist

  1. 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.

  2. Test below, at and above

    Use the sizes on either side of the limit, and the exact size if one is published.

  3. 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.

  4. Check the error

    An oversized upload should produce a clear message, ideally before the whole file has been sent.

  5. 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

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.