2 MB BIN sample file

A BIN file of exactly 2,097,152 bytes. It is a valid Binary test file file, generated for this site and checked with an independent parser. Use it wherever you need a 2 MB sample, test or dummy BIN file.

Download

sample-bin-2mb.bin

2 MB2,097,152 bytes

Download 2 MB BIN

Direct download. No sign-up and no waiting.

Type
application/octet-stream
SHA-256
6a8d72c6f8ddb3941f646edc642805cfc6f5b4d562e32fdc1a0e83f82245778d
Direct URL
https://sampletestfiles.com/downloads/bin/sample-bin-2mb.bin

What is in this file

2,097,152 pseudo-random bytes from a seeded generator, so every build of the file is identical and compression cannot shrink it.

ContentPseudo-random bytes
CompressibleNo
StructureNone

First bytes of the file

The first 64 bytes of sample-bin-2mb.bin as a hex dump: offset, bytes, then the same bytes as text.

00000000  b5 b4 c1 47 8f 90 55 d9 59 9b c5 7b 62 2a a7 0b  |...G..U.Y..{b*..|
00000010  8c 8b 21 7b f8 b1 04 1b 4f f0 66 35 8c ad 01 b5  |..!{....O.f5....|
00000020  5e f2 1d 4a 36 b8 ee f8 a3 08 2c 2e b1 dd 6a ba  |^..J6.....,...j.|
00000030  45 a4 a2 b1 a3 25 6f cc 43 8b fe 4f fe 12 5b 9b  |E....%o.C..O..[.|

Preview

BIN files cannot be shown in a browser. Download the file and open it in an application that reads BIN, such as curl, wget and browser download managers.

Where 2 MB matters

A 2,097,152-byte file: exactly the default upload limit of PHP, and twice the default of nginx and Spring Boot. These are the default limits a file of this size is useful for testing:

SystemLimitNote
PHP2 MB per uploaded file by default (upload_max_filesize)A file of exactly 2 MB is accepted; one byte more is refused.
nginx1 MB by default (client_max_body_size)Rejected with 413 Request Entity Too Large.
Spring Boot multipart1 MB per file by default (max-file-size)Rejected unless the property is raised.
Django2.5 MB in memory by default2 MB is held in memory; the 5 MB sample is streamed to a temporary file.
Vercel Functions4.5 MB request bodyAccepted, including as base64 at about 2.8 MB.

All 2 MB sample files

Use this file for

  • Finding out whether a 1 MB default has been raised
  • Testing size limits precisely
  • Checking resumable and chunked uploads

Testing notes for BIN

  • Because application/octet-stream says nothing about content, strict upload filters reject these files. That is itself a useful test.
  • A file of zeros, as produced by many quick commands, compresses to almost nothing, which makes transfers look far faster than they are.

BIN format reference

Technical details

File namesample-bin-2mb.bin
FormatBIN (Binary test file)
Extension.bin
MIME typeapplication/octet-stream
Size2,097,152 bytes (2 MB)
KindBinary
SHA-2566a8d72c6f8ddb3941f646edc642805cfc6f5b4d562e32fdc1a0e83f82245778d
Created2026-10-10
ValidationExact size, signature bytes and structure checked when the file was generated
PreviewNot available for this file; details only
SourceGenerated for this site; not copied from elsewhere
LicenceFree to use, modify and redistribute (terms)
CategoryTesting

Validated for expected format and integrity. As with any download, scan the file with your own security tools before opening it. How files are made and checked

Download from the command line and verify

Fetch the file with curl, then compare its checksum with the SHA-256 value above.

curl -o sample-bin-2mb.bin 'https://sampletestfiles.com/downloads/bin/sample-bin-2mb.bin'
sha256sum sample-bin-2mb.bin     # Linux
shasum -a 256 sample-bin-2mb.bin # macOS

On Windows, run Get-FileHash sample-bin-2mb.bin -Algorithm SHA256 in PowerShell. A matching value proves that the download is complete and unaltered.

Related files

Questions about this file

Is this file exactly 2 MB?
Yes. It is 2,097,152 bytes, which is 2 MB in the binary units that operating systems and server limits use (1 KB = 1,024 bytes).
What is inside the 2 MB BIN file?
2,097,152 pseudo-random bytes from a seeded generator, so every build of the file is identical and compression cannot shrink it.
Why not use a file full of zeros?
Zeros compress to nearly nothing, so any compression between server and client hides the true transfer size. Random bytes do not.