Free BMP test files and sample generator
Uncompressed raster format storing raw pixel data. Simple but large; used in legacy Windows tooling.
What is a .bmp file?
BMP: Bitmap Image. BMP stores pixels uncompressed, which makes files large but the format trivially simple to parse. That simplicity is useful when you want to isolate image handling from decompression behavior.
Why generate a test BMP file?
- Test image handling without a compression stage in the way.
- Generate a deliberately large image file to probe upload limits.
- Verify raw-pixel parsing in your own image code.
What you can put inside a .bmp file
You get 3 content options for BMP, so the file holds something meaningful rather than random padding: Solid color, Gradient, Checkerboard. For BMP these are alternatives, so choose the one that matches what you need to test.
How a .bmp file is identified
Every .bmp file begins with 42 4D, "BM". That is what a validator inspecting content rather than the file name looks for.
How the size lands on the exact byte
The height carries most of the size and the remainder trails after the pixel data, past the length the header declares.
Negative testing with broken BMP files
- Invalid. Identifiable, but wrong inside, so it fails during parsing.
- Corrupted. The leading bytes are destroyed, so the
42 4Didentifying a .bmp is gone. Same length as the valid file. - Incomplete. Truncated part-way, so it is genuinely shorter.
- Empty. Chosen under Content rather than File Condition: valid structure, no data.
Which failure to reach for, and what to assert for each, is covered in how to make a corrupted file for testing. For upload limits and type checks see testing file upload validation.
Sample BMP content
[Binary image], 1024×768, 24-bit, uncompressed.
This shows the shape of the file. Your download is generated fresh at the size you choose, so the values will differ.
How to open and verify the file
Open in any image viewer, Paint or Preview.
Media type image/bmp · extension .bmp · category Images
Generate a .bmp file → · questions about sizes, privacy or cost are answered on the site FAQ.
Frequently asked questions about BMP files
What identifies a .bmp file?
A .bmp file begins with the bytes 42 4D, "BM". Those bytes are what a content-sniffing validator looks for, and what the Corrupted condition destroys.
How can a .bmp file be an exact number of bytes?
The height carries most of the size and the remainder trails after the pixel data, past the length the header declares.
What can go inside the BMP file?
There are 3 content options for .bmp: Solid color, Gradient, Checkerboard. For BMP these are alternatives, so pick the one matching what you need to test.
Can I download several broken BMP files at once?
Yes, select more than one File Condition and you get one ZIP containing a .bmp per condition, each named after its condition.
Can the BMP file use UTF-16 or a byte-order mark?
No, and deliberately. A .bmp file is a container rather than plain text, so rewriting its bytes as UTF-16 would not produce a UTF-16 document. It would produce a broken file. Use a text format such as CSV, JSON or XML for encoding tests.
How do I open or verify the BMP file?
Open in any image viewer, Paint or Preview.