Compress BMP images in your browser

A bitmap stores every pixel raw. We rewrite it as a palette with run-length coding, which is the only real compression the format has.

BMP
No BMP selected
Drop a file to start
Drop BMP files here

or browse your device. Everything is processed on this device

No BMP to hand?

How to compress a BMP

01
Drop the bitmaps

BMP or DIB, one or a hundred. Nothing is uploaded at any point.

02
Choose a palette

Leave it at 256 for screenshots and diagrams. Drop it lower for flat artwork and watch the file fall further.

03
Save the result

You get a valid BMP written from scratch, or a nudge towards PNG if that is the better answer.

What is a BMP file, and should you still be using one?

BMP is Microsoft's device independent bitmap, and it is about as simple as an image format gets: a short header saying how big the picture is, then the pixels, one after another, with nothing done to them. A 1920 by 1080 screenshot at 24 bits a pixel is 6.2MB, every time, whether it is a photograph or a blank white rectangle. That is not a bug, it is the design. BMP was built when writing an image had to be trivial for a program to do.

The format does have one compression mode: BI_RLE8, which stores runs of the same palette colour as a count and a value. On the kind of image people actually save as BMP, meaning screenshots, UI mockups, scans of line art and anything with flat regions, it is startlingly effective, and it is what this tool writes when it wins. The catch is that BI_RLE8 requires an 8-bit palette, so the image has to come down to 256 colours first, and a small number of very old programs read only uncompressed BMPs.

The blunt version: unless a specific legacy program is going to open this file, it should not be a BMP at all. PNG is lossless, reads everywhere, and stores the same pixels typically 60 to 90% smaller than a raw bitmap. If you are putting the image on a website, into a document, or anywhere near an email, convert it and stop thinking about it.

BMP compression FAQ

Why is my BMP so huge?

Because a BMP stores every pixel literally, with no compression at all in its usual form. The size is width times height times three bytes, plus a little padding, and it does not care what is in the picture. A blank white 4000 by 3000 bitmap is the same 36MB as a photograph of the same size.

Can a BMP be compressed at all?

Yes, but only one way: BI_RLE8, an 8-bit palette with run-length coding built into the format. It is genuine compression and it is what this tool writes when it comes out smaller, which on screenshots and flat artwork is nearly always. The catch is that it needs the image reduced to 256 colours, and a handful of very old readers refuse RLE bitmaps and will only open the uncompressed kind. If your file has to go into something ancient, set the colours to 256 and we will still hand you the smaller of the two, or keep the original.

BMP or PNG?

PNG, almost always. PNG is lossless, so you lose nothing, and it stores the same picture typically 60 to 90% smaller than a raw bitmap. Every browser, operating system and image editor written this century reads it. BMP is the right answer only when a specific old program demands it.

Will compressing a BMP lose quality?

Only if the palette has to shrink. At 256 colours a screenshot, diagram or piece of flat artwork usually comes through pixel for pixel identical, and we tell you when nothing was approximated. A photograph reduced to 256 colours will band visibly, which is the point at which you should be reaching for PNG or JPG instead.

What is a DIB file?

The same thing. DIB stands for device independent bitmap and is the structure inside a BMP file, minus the fourteen byte file header. Files saved with a .dib extension open here exactly like a .bmp.

Does it keep transparency?

No. A 32-bit BMP can carry an alpha channel, but almost nothing reads it correctly, and an 8-bit palette has no alpha at all. Transparent pixels are painted onto white. If the transparency matters, use PNG.

Do my files get uploaded?

No. The decoding, the palette and the BMP writer all run in this tab. There is no upload endpoint in the code to send them to.

Drop more files

Same format joins the queue. Anything else re-routes to its own tool.