Download a sample BMP image of any size
Get an uncompressed 24-bit Windows bitmap at the exact byte count you need.
1 MB = 1,000,000 B · 1 MiB = 1,048,576 B
Advanced: test an upload limit
Enter the byte limit above, then choose one byte below, the exact limit or one byte above. Each choice uses the same base: 10,485,760 B. Generate and download each file to test your endpoint.
How is the sample BMP file built?
Each file is a 24-bit BMP with a BITMAPINFOHEADER and no compression. The generator picks the largest 4:3 picture that fits, up to 4096 × 3072 pixels, and places the remaining bytes as a gap between the headers and the pixel array. The bfOffBits field in the file header points past that gap, which is how the format itself allows extra space.
The smallest valid BMP file is 58 bytes; any byte count from there up to 2 GiB can be selected. MIME type: image/bmp.
Which BMP size do you need?
What is inside a 1 MiB BMP file?
The 1 MiB sample is 640 × 480 pixels. The pixel rows take 921,600 bytes and start at offset 126,976; the 126,922 bytes before them, after the 54-byte headers, are zero. Rows are stored bottom-up and each row is padded to a multiple of four bytes, as the format requires.
When is a sample BMP file useful?
- Testing converters that turn BMP into PNG or JPEG and should reduce the size a lot.
- Checking that an upload filter recognises BMP by its BM signature, not only by extension.
- Feeding a decoder a file whose pixel data does not start right after the header.
Questions about BMP test files
Will Paint open it?
Yes. Windows Paint, Photos and browsers open it. The gap before the pixels is skipped through the bfOffBits field.
Why is there empty space in the file?
A BMP's size is fixed by its dimensions. To reach an exact byte count, the extra bytes sit between the header and the pixels, where the format allows them.
Format reference and related tools
Format reference: Microsoft, Bitmap Storage.
Other formats in this family (Images): PNG · JPG · WebP · SVG · GIF · TIFF · ICO.
Related: Image Convert · Compress Image · Bytes to MB converter
Noticed an issue with this test file? Report an issue →