Why a BMP is so big
BMP is the Windows bitmap format. In its usual form it is a header followed by one number for every colour of every pixel, with no compression at all. A picture 2048 pixels wide and 1536 tall at 24 bits, which is 3 bytes per pixel, needs 2048 times 1536 times 3 bytes: 9,437,184 bytes, plus a 54 byte header. The test file was exactly that size.
That is why BMP files turn up where nobody planned for size: old scanner software, screenshots from legacy programs, game and device assets, and exports from programs that never added a better format. MDN's guide says BMP is generally used only for special cases and that you should typically avoid it for website content.
JPG throws away detail the eye is unlikely to notice. The same picture as a JPG at quality 90 was 683 KB. A lossless PNG of it was 4.5 MB, which is why BMP to PNG is the right choice for graphics but not for photographs.
What changes when a bitmap becomes a JPG
- Detail. JPG is lossy. At 90 you will rarely see a difference in a photo. Sharp text, thin lines and flat colours can pick up fuzzy edges, so a screenshot of a program window is usually better as a PNG.
- Colour. Every BMP is read into 8 bits for red, green and blue. A 16 bit RGB565 file, an 8 bit palette file and a 1 bit black and white file all become ordinary full colour pixels before they are compressed.
- Transparency. Most BMP files have none. A 32 bit BMP can carry an alpha channel if its header declares one, and the tool then flattens it onto your background colour because JPG cannot be see-through.
- Name and date. The new file takes the old name with a .jpg ending. Any date or comment stored by the program that made the BMP stays behind, because BMP has no standard place for it.
Which BMP files the page opens
The page does not contain its own BMP reader. Your browser decodes the file, which keeps the code small and means the result is the same as the picture you would see in a browser tab. MDN lists BMP as supported in every current browser.
We checked nine different files in Chrome against Pillow, the Python imaging library: 24 bit, 8 bit palette, 1 bit, 16 bit, 32 bit with an alpha mask, RLE8 compressed, top-down, old OS/2 style, and a 2048 by 1536 photo. All of them opened and gave the same pixels as Pillow, within one level of 255. Other browsers may differ for rare variants. When a file cannot be read, its row says so in plain words and the other files continue.
Quality for scans, screenshots and old files
For a scan or a photo, 90 is a good start and 80 saves more space with little visible change. For a screenshot with small text, raise the quality to 95. From 95 the encoder also keeps colour at full detail instead of half detail, which keeps red and blue text clean. Below 95, thin coloured lines can look a little smudged.
If the BMP is a diagram, logo or pixel art with few colours, a JPG is usually bigger and less clean than a PNG. Check the list: it shows the size of every result next to the original. Convert once from the BMP, and do not convert the JPG again later.