JPG to BMP Converter
- The Exif data, the colour profile and anything else the original carried are not passed on: the picture is decoded to plain pixels and a new file is written from them.
Needs JavaScript. Runs only here.
This page turns a JPG into a BMP on your own machine. Every conversion on this page runs in your browser. The picture is read, drawn and written on your own machine, and the file is not sent to a server.
How do you convert a JPG to a BMP?
The JPG is decoded once to plain pixels and those pixels are written out raw. The bitmap is much larger than the JPG and holds exactly the detail the JPG had left.
- Choose the JPG file you want to convert. It is read inside this page, on your own machine.
- Select Convert to BMP. The page reads the first bytes of what came back and refuses the file if they are not BMP.
- Download the BMP. Nothing has been sent anywhere, so the file is ready as soon as it is written.
What Changes From JPG to BMP
JPG to BMP decodes the JPEG once and writes the resulting pixels out raw. The bitmap is much larger than the JPG and looks no better: it holds exactly the detail the JPEG had left.
Each row below is one property of the picture: what it is in the JPG, what it becomes in the BMP, and whether it survives the trip. Convert a file and the same rows fill in with the measurements from your own picture.
| Property | In the JPG | In the BMP | Verdict |
|---|---|---|---|
| Dimensions | as the file has them | as the file has them | kept |
| Colour model and bit depth | Y'CbCr, 8 bits per channel | BGR, 8 bits per channel, 24 bits per pixel — 8 bits per sample, whatever the source held | changed |
| Alpha channel | none | none | kept |
| Colours used | up to 16,777,216 | the same pixels | kept |
| Animation frames | 1 | 1 | kept |
| Metadata (Exif, ICC) | present in the file | dropped — a new file is written from pixels | lost |
| Compression | lossy, discrete cosine transform (the baseline process) | none — the pixel array is stored uncompressed | changed |
| File size | the file you chose | much larger — the pixel array is stored uncompressed | changed |
the pixels survive; the Exif data does not.
What Travels With the Picture
What the two formats are, and what the browser does with a picture on the way between them. None of this depends on which JPG you bring.
How JPG and BMP Are Defined
| Property | JPG | BMP |
|---|---|---|
| Compression | lossy, discrete cosine transform (the baseline sequential process); the standard also defines a separate lossless mode that web .jpg files do not use | normally none - the pixel array is stored uncompressed |
| Alpha channel | none - neither T.81 nor JFIF defines an alpha or transparency channel | not carried by the files this converter writes; a BMP written from a browser canvas is opaque |
| Animation | none - one image per file | none - one image per file |
| In one sentence | JPEG saves space by throwing detail away. The baseline process, which is what a .jpg file on the web uses, is lossy and cannot be undone, and the standard defines no transparency at all. | A BMP stores the pixel array with no compression, which is why a bitmap of the same picture is far larger than a PNG or a JPEG of it. |
- A JPG file begins FF D8 (SOI); a JFIF file follows it with FF E0 and the identifier 4A 46 49 46 00.
- A BMP file begins 42 4D ("BM"). The header field is the little-endian word 0x4D42..
- JPEG is defined by ITU-T Rec. T.81 | ISO/IEC 10918-1 (JPEG); ITU-T Rec. T.871 | ISO/IEC 10918-5 (JFIF).
- BMP is defined by no international standard; Microsoft documents the BITMAPFILEHEADER and BITMAPINFOHEADER structures.
JPEG and lossy WebP save space by discarding picture detail, and what they discard does not come back. PNG, BMP and lossless WebP keep every pixel they are given, and GIF keeps every pixel it is left with after the palette has been applied.
Every save as JPEG compresses the picture again. A JPEG that has been converted and saved once more carries the loss from both steps, and the second one cannot be undone by going back.
Converting a picture back to the format it came from does not return the original file. Whatever a step discarded stays discarded, and the return trip writes a third file.
The browser decodes the picture to plain pixels and writes a new file from them, so the Exif data, the colour profile and anything else the original carried are not passed on.
No browser writes BMP from a canvas. The file header and the pixel array have to be assembled in JavaScript from the canvas pixel data.
A file written from a canvas uses the bit depth that best preserves the canvas, so an ordinary eight-bit canvas writes eight bits per sample however deep the original was.
What Bit Depth Should the Bitmap Use?
The depth is decided by the canvas
A file written from a canvas uses the bit depth that best preserves the canvas, so an ordinary eight-bit canvas writes eight bits per sample however deep the original was.
What this page writes
Three bytes per pixel, blue, green and red, with each row padded out to a multiple of four bytes. That is the plainest form of the format and the one older software is most likely to read.
Why a deeper file would not help
The picture arrives from an eight-bit drawing surface, so the extra room a deeper BMP offers would hold nothing the JPG carried. Depth stores precision; it does not create any, and a file twice the size holding the same numbers is a worse file.
Common Mistakes
- Expecting the BMP to look better than the JPG. It holds the same pixels, stored at much greater length.
- Expecting a choice of depth. The drawing surface fixes the output at eight bits per sample, whatever the original held.
- Sending a BMP where a JPG would do. It is many times larger and gains nothing at all on screen.
Frequently Asked Questions
Does a BMP made from a JPG look better than the JPG?
No. JPG to BMP decodes the JPEG once and writes the resulting pixels out raw. The bitmap is much larger than the JPG and looks no better: it holds exactly the detail the JPEG had left.
Which bit depth should a BMP use?
This page writes 24 bits per pixel: three bytes of colour and no alpha. A deeper file would carry no more of the picture, because the drawing surface holds eight bits a sample, and 24-bit is the form older software is likeliest to read.
Why is the BMP so much larger than the JPG?
Because it stores the pixel array outright while the JPG stores an approximation of it. normally none - the pixel array is stored uncompressed, so the size follows from the width and the height and from nothing else.
Related Conversions
The rest of the family sits on every image format this site converts.