BMP to JPG Converter

A bitmap stores every pixel at full width, so a screen sized BMP weighs several megabytes before you have done anything with it. Drop one here to read its header, set the JPEG quality, and watch the byte count fall. The file never leaves your machine.

BMP to JPG conversion bench

  • Header parsed on your device
  • Byte counts, not estimates
  • Tells you why a file fails

Drop a BMP here or tap to browse

One file at a time. The header readout appears before the picture does.

A bitmap has no compression to undo, so the conversion is pure arithmetic

Most format conversions swap one compression scheme for another. This one does not. A standard BMP writes each pixel out in full, row after row, with no attempt at shrinking anything. A 1920 by 1080 photo saved as a 24 bit bitmap occupies about 5.9 MB whether the picture is a sunset or a blank white rectangle. The same photo as a JPEG at quality 88 lands somewhere near 250 KB. Nothing clever happened. The bitmap was simply storing raw numbers, and JPEG stopped doing that.

Because the input is raw, the interesting part of a BMP is its header rather than its pixels. The panel above reads those bytes directly and reports the color depth, the compression flag, the row order and the padding the format inserts at the end of every row. Those five fields predict the file size to within a few bytes, and when a bitmap refuses to open they tell you which one is at fault.

Where the megabytes actually go

BMP pads each row of pixels out to a multiple of four bytes. The row length is fixed by this formula, and the file size follows from it:

rowStride = floor((bitsPerPixel * width + 31) / 32) * 4
pixelBytes = rowStride * height

Take a 1000 by 800 image at 24 bits per pixel. Each row holds 3000 bytes of color, which is already a multiple of four, so the stride stays at 3000 and the pixel data reaches 2.4 million bytes. Change the width to 999 and each row now holds 2997 bytes of color, padded up to 3000. You paid for 2400 wasted bytes to gain nothing. At 1 bit per pixel the padding gets absurd, since a 33 pixel wide monochrome image still burns 8 bytes per row.

This is also why the readout shows a row order. Bitmaps store their rows from the bottom up by default, a decision inherited from the coordinate system of early Windows graphics. A negative height in the header flips it to top down. Neither affects what you see here, since the browser sorts it out during decode, but a file written by hand with the wrong sign arrives upside down, and the header is where you confirm which convention it used.

Reading the header panel

The DIB header size is the first useful number, because it identifies the era and the writer of the file. The compression field matters more, since two of its values stop a browser cold.

Field valueMeaningConverts here
Header 12 bytesBITMAPCOREHEADER, the OS/2 1.x originalUsually yes
Header 40 bytesBITMAPINFOHEADER, what almost everything writesYes
Header 108 or 124BITMAPV4 or V5, adds color space and alpha masksYes
Header 64 bytesOS/2 2.x extended headerOften not
BI_RGBNo compression, the plain caseYes
BI_BITFIELDSCustom channel masks, common at 16 and 32 bitUsually yes
BI_RLE8 or BI_RLE4Run length packing for indexed imagesNo, browsers skip it
BI_JPEG or BI_PNGA whole JPEG or PNG wrapped in a BMP shellNo, and it needs no conversion

Color depth changes what the conversion is worth. An 8 bit bitmap carries a palette of 256 entries and one index byte per pixel, so it was already fairly compact. Sending it to JPEG often saves less than you expect, and the encoder adds faint noise inside the flat palette regions on the way. A 24 or 32 bit bitmap is where the large drops live.

Quality settings for the three kinds of BMP people convert

Numbers on a slider mean little on their own. What matters is where the bitmap came from, because BMP survives in a handful of specific places and each one wants a different setting.

The quality percentage is not a portable measurement. Each encoder maps the number onto its own quantization tables, so 88 on this page and 88 in a desktop editor are different files. Read the byte count in the ledger rather than trusting the number to travel.

When PNG is the better target

Both formats will shrink a bitmap dramatically, so the choice is about what kind of damage you accept.

Bitmaps your browser will refuse to decode

The decoder here is the browser image pipeline, which covers the common cases well and ignores several corners of the specification. When a file fails, the header readout still appears, because the parser runs on the raw bytes before any decoding is attempted. That is the point of showing it. Instead of a blank error you get the field responsible.

Where this converter stops

Questions that come up with bitmap files

File sizes, failed decodes, palettes and what the header fields are telling you.

Why is my BMP file so much larger than every other image on my disk?

Because a standard bitmap applies no compression at all. Each pixel is written out in full, and each row is padded to a multiple of four bytes. Multiply width by height by bytes per pixel and you have the file size, near enough. A blank white 1920 by 1080 bitmap at 24 bit costs the same 5.9 MB as a detailed photograph at those dimensions, since the format has no way to notice the blank one is repetitive.

How much smaller will the JPG be?

For a 24 bit photographic bitmap at quality 88, expect the output to land between three and eight percent of the original, so a 6 MB source becomes roughly 200 to 500 KB. Indexed 8 bit bitmaps save far less, often only half, because they were already compact. The ledger in the panel reports the measured byte count for your file rather than a range, so use that number.

The tool says my file cannot be decoded. What now?

Check the compression field in the header readout. If it reads BI_RLE8 or BI_RLE4, the bitmap uses run length packing that browsers decline to open. Load the file in an image editor and save it again as an uncompressed BMP, then bring it back here. If the readout says the signature is missing, the file is not a bitmap at all despite the extension, which happens when something was renamed rather than converted.

What does bottom-up row order mean, and should I worry about it?

Bitmaps normally store the last row of the image first and work upward, a convention carried over from early Windows graphics. A negative height value in the header signals the opposite arrangement. Browsers handle both, so it changes nothing about your output. It matters when you write bitmap files in code, where the wrong sign produces a vertically flipped image.

Do transparent areas survive the conversion?

No. JPEG has no alpha channel. A 32 bit bitmap with a V4 or V5 header may carry real transparency, and those pixels get composited onto the fill color you choose before encoding. Soft edges blend toward that color permanently. Set the fill to match the background the image will sit on, or send the file to PNG instead if the transparency needs to stay.

Are my files uploaded anywhere?

No. The header parse reads the file as an ArrayBuffer in the page, and the conversion runs through the browser canvas. There is no request to any server after the page loads. Disconnect your network once the page appears and everything above keeps working. Nothing is stored between visits, so closing the tab clears the file.

Why does an 8 bit bitmap barely shrink?

It holds one byte per pixel plus a palette of up to 256 colors, so it started out four times smaller than a 24 bit file of the same dimensions. JPEG then works against the grain of that image, since palette based art tends to hold flat regions and hard edges. The encoder spends bytes on noise inside those flat areas. PNG is the better destination for indexed bitmaps.

What still produces BMP files in the first place?

Scanner drivers and document capture software, Windows Paint and older screenshot tools, industrial and medical imaging equipment, game engine texture pipelines, and anything written against the Windows GDI API where BMP was the path of least resistance. The format persists because writing one takes about twenty lines of code and reading one takes fewer.

Can I get the bitmap back from the JPG?

You can produce a BMP from it, but the detail JPEG discarded does not return. The result is a large uncompressed file holding degraded data. If there is any chance you need the original quality, keep the source bitmap and treat the JPG as a delivery copy.