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

Created in your browser in a few seconds, then checked against the SHA-256 checksum. No sign-up.

Type
application/octet-stream
SHA-256
b0e31cf32f701017d75e640f312748880ead03e7c765a51f376300d32bdf24fe
Delivery
Created in your browser. Files of 2 MB and more have no direct URL (why).

What is in this file

2,097,152 pseudo-random bytes from a seeded generator, so every copy 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  da a8 c4 b5 cd 5b 4d 49 fa e3 af f3 83 ed 0c 1a  |.....[MI........|
00000010  3a bc df 60 6f 61 73 a7 fb fc 6d 50 a0 da d0 4e  |:..`oas...mP...N|
00000020  ae c3 8b 8f dd 78 1b 5e 1b 2e 24 ff 41 f2 63 71  |.....x.^..$.A.cq|
00000030  31 c8 22 ac 1b 25 9a 69 bc cd 58 4f b6 f9 89 8c  |1."..%.i..XO....|

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-256b0e31cf32f701017d75e640f312748880ead03e7c765a51f376300d32bdf24fe
Created2026-10-14
ValidationExact size, signature bytes and structure checked when the generator was built; your copy is checked against the SHA-256 after it is created
PreviewNot available for this file; details only
SourceGenerated in your browser by this site's generator; 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

Verify your copy

This file is created in your browser, so it has no direct URL for curl or wget. The bytes are the same every time and in every browser, so after saving it you can compare its checksum with the SHA-256 value above.

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. For scripts and pipelines, save the file once and keep your own copy, or use a 1 MB file, which has a direct URL.

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.