Lean Image
Open menu

The BMP format

A BMP stores every pixel literally, one after another, with no compression of any kind. That was a defensible trade in 1986 and it is why a 12-megapixel photograph saved as a BMP runs to roughly 36 MB. It also makes a BMP the most rewarding thing you can hand a converter: there is nowhere for the size to go but down.

BMP at a glance

Introduced
1986 · Microsoft
File extensions
.bmp, .dib
MIME type
image/bmp
Compression
Lossless
Transparency
Yes, with soft edges
Animation
No
Colour depth
8 bits per channel
Wide gamut
sRGB only
High dynamic range
No
Maximum dimension
No practical limit
Support
Every current browser; some older software will not

Lean Image reads BMP but cannot write it.

Where it came from

BMP arrived with Windows 1.0 in 1986, and the full name explains the design: the device-independent bitmap. The file was meant to hold pixels in a layout the display hardware could accept with as little work as possible, so drawing one was closer to a memory copy than to a decode. On a machine where the processor was the scarce resource, spending cycles unpacking a compressed image to save disk space was the wrong way round.

The structure has barely changed since. A short file header, a header describing the pixel layout, then the rows of pixels themselves — stored bottom-up, and padded so every row starts on a four-byte boundary. Both of those details have caught out every programmer who has ever written a BMP parser for the first time.

Why the files are so big

There is no mystery in it. A 4000 × 3000 photograph at 24 bits per pixel occupies 4000 × 3000 × 3 bytes, which is around 36 MB, and it occupies exactly that whether the image is a landscape or a flat grey square. The format does define a run-length encoding for its 4- and 8-bit colour-mapped modes, but almost nothing writes it and it does nothing useful for photographs.

Compare that with the alternatives holding the same picture: a JPEG at a sensible quality lands somewhere around 2–4 MB, a PNG of a screenshot often a tenth of the bitmap, a WebP smaller again. That gap is the whole reason people arrive here with a BMP.

What it is still good for

Simplicity, mainly. A working BMP decoder fits in a page of code with no library behind it, which is why the format survives in firmware, embedded interfaces, test fixtures and Windows resource files — places where a dependency costs more than the bytes do. It is also a reasonable scratch format when two programs on the same machine are passing pixels back and forth and the disk is free.

The common variants carry no metadata at all: no EXIF, no GPS coordinates, no capture date. Occasionally that is a feature rather than an omission.

Why nothing here saves one

There is no version of “make this image smaller” that ends in an uncompressed bitmap, so BMP is not one of the five formats this tool writes. Reading is a different question and costs nothing — browsers decode BMP themselves, so no extra code is downloaded to open one.

Inbound is where BMP is interesting. It is the format that produces the largest reductions this tool ever reports, and the reduction is not a compromise: converting to PNG keeps every pixel exactly and still throws away most of the file.

What to convert it to

PNG is the default. Lossless, the same pixels, transparency preserved where the source had it, and typically a fraction of the size. If you do not have a specific reason to choose otherwise, choose this.

JPG if the image is a photograph and the file needs to be small. It is lossy, so it is the wrong answer for line art, screenshots or anything with hard edges and flat colour.

WebP if it is going on a website. Smaller than PNG for graphics and smaller than JPEG for photographs, and every current browser displays it.

Convert a BMP into something else

There is no dedicated BMP conversion page yet, but the optimizer reads the format perfectly well.

Questions about BMP

Why is my BMP file so large?

Because the size is arithmetic rather than content. Three bytes per pixel, one pixel at a time, with nothing compressed — so a 4000 × 3000 image is about 36 MB whether it is a photograph or a blank white rectangle. Every other format on this site compresses; BMP does not.

Can I convert something to BMP here?

No, and it is deliberate. Writing a BMP means producing the largest file the pipeline is capable of producing, which is the opposite of what this tool is for. Reading one is free — browsers decode BMP natively — so the direction that helps is the inbound one.

Is BMP lossless?

Yes, trivially: nothing is discarded because nothing is compressed. PNG is also lossless, stores the identical pixels, and is usually a small fraction of the size — which is why it is the default answer for a BMP you want to keep exactly.

Do BMP files support transparency?

The 32-bit variants carry an alpha channel, but honouring it is inconsistent across software — the same file can be transparent in one program and opaque in the next. If the transparency matters, convert to PNG, where it is unambiguous.

What opens a BMP file?

Effectively everything on a desktop: Windows Photos and Paint, macOS Preview, every image editor, and every current browser. It is old and simple enough that support is close to universal, even though almost nothing chooses to save one any more.

Work with a BMP file

Drop one in and see what comes out, without uploading anything.