The short answer
A .bmp file is a grid of pixels written out one row at a time. There is a small header that says how wide and tall the picture is and how many bits each pixel uses, and then the pixel values follow. In the common case there is no compression at all, so the picture's content doesn't change the file size: a photo of a busy street and a plain white square of the same dimensions produce the same number of bytes.
That makes BMP simple and fast to read, which is why it shows up in old Windows programs, embedded devices, some printers and machine-vision tools. For storing or sharing pictures it is almost always the wrong choice.
You can calculate the size before saving
Because nothing is compressed, the size is arithmetic. Each row takes width × bits per pixel ÷ 8 bytes, rounded up to a multiple of 4 (the format requires rows to start on a 4-byte boundary). Multiply by the height and add the header: 54 bytes, plus a color table for 1-, 4- and 8-bit images.
| Dimensions | 1-bit (black/white) | 8-bit (256 colors) | 24-bit (full color) | 32-bit |
|---|---|---|---|---|
| 640×480 | 37.6KB | 301.1KB | 900.1KB | 1.17MB |
| 1280×960 | 150.1KB | 1.17MB | 3.52MB | 4.69MB |
| 1920×1080 | 253.2KB | 1.98MB | 5.93MB | 7.91MB |
| 3000×4000 (12 MP phone photo) | 1.43MB | 11.45MB | 34.33MB | 45.78MB |
A 12-megapixel phone photo is about 34MB as a 24-bit BMP. The phone's own JPG of the same shot is typically a few megabytes.
The row padding is easy to trip over if you write your own BMP reader. A 24-bit image 1000 pixels wide needs exactly 3,000 bytes per row, which is already a multiple of 4. At 1001 pixels a row needs 3,003 bytes and is stored as 3,004, with one filler byte at the end of every row. Code that assumes width × 3 reads a slanted, garbled picture.
Measured: one photo, three formats
The photo is a picture of a roast chicken in foil, taken by the site's operator on a phone and scaled to 960×1280 for these pages. Files were written with the image library sharp 0.35.5 (libvips 8.18.7); the BMP was assembled from the raw pixels following the format, since sharp can't write BMP.
| File | Size | Compared with BMP |
|---|---|---|
| BMP 24-bit | 3.52MB | — |
| PNG (lossless) | 1.95MB | 56% |
| JPG quality 90 | 342.7KB | 10% (PSNR 38.4 dB) |
| JPG quality 80 | 226.0KB | 6% (PSNR 36.0 dB) |
The BMP came out at exactly the byte count the formula predicts, 3,686,454 bytes. PNG stores the same pixels with no loss in a bit over half the space. A JPG at quality 90 is about a tenth of the BMP and, at that size, the difference from the original is hard to see without zooming in.
The gap grows with flat graphics. A 512×512 badge with a transparent background (a blue circle with a yellow star) is 1.00MB as a 32-bit BMP and 35.1KB as PNG, about 29 times smaller. PNG compresses runs of identical pixels; BMP writes every one of them.
What the bit depth does to a picture
Lower bit depths shrink the file but limit how many colors each pixel can have. Below, the same crop of the test photo at full color, reduced to 256 colors, reduced to 16 colors, and reduced to black and white.

256 colors hold up surprisingly well on this crop because the photo is mostly browns and oranges. With 16 colors the gradients break into bands and dither speckles. One bit leaves only a silhouette of the highlights, which is what 1-bit BMPs are for: scanned text, masks and simple icons on old displays.
Where BMP opens, and where it doesn't
Windows has opened BMP natively since the beginning, and macOS Preview, Linux image viewers and every current browser display it too. The trouble is on the other side: many upload forms, chat apps and websites reject .bmp, or accept it and convert it themselves at their own quality settings.
BMP has no standard way to store EXIF data such as camera model or GPS location, so converting a phone photo to BMP and back drops that information. Newer versions of the BMP header allow a 32-bit layout with an alpha channel, but support for it varies between programs; don't rely on BMP for transparency.
When to use BMP and when to avoid it
Use BMP when a specific program, device or SDK asks for it: some microcontroller display libraries, older Windows tools, label printers and lab software read only uncompressed bitmaps, because decoding them needs no extra code.
Avoid it for anything you store, email or upload. For lossless storage use PNG; for photos use JPG or WebP. If you received a BMP and want to use it elsewhere, convert it once and keep the smaller file.
This site's converter reads BMP and writes 24-bit BMP. Transparent areas in the source are filled with the background color you pick, because a 24-bit BMP has no alpha channel. Everything runs in your browser; the file isn't uploaded.
FAQ
Why is my BMP so much bigger than the JPG it came from?
The JPG was compressed and the BMP is not. Converting JPG to BMP doesn't bring back any detail the JPG discarded; it only writes out every pixel in full. A 960×1280 photo becomes 3.52MB regardless of how small the JPG was.
Is converting BMP to PNG lossless?
Yes, for 24-bit and 8-bit BMPs. PNG stores exactly the same pixel values. In the measurement above the PNG was about 56% of the BMP's size with identical pixels.
Can a BMP have a transparent background?
The format allows a 32-bit layout with alpha, but many programs ignore it and show the transparent areas as black or white. If you need transparency, use PNG or WebP instead.
Does a BMP lose quality when saved repeatedly?
No. Without compression nothing is thrown away on save. That's the one advantage it shares with PNG, which keeps the same pixels in far less space.
Related
- All image formats compared
- Choosing an image format
- File extension vs the real format inside
- How these measurements are made
- Image converter (BMP in and out)
This page was last updated on 2026-11-30