How to convert BMP to Base64
- Drop a
.bmpfile on the box or choose it with the file picker. - To keep it as a bitmap, leave the image options alone and the original bytes are encoded.
- To shrink it, choose PNG under Convert to. Ticking Strip metadata (EXIF) or setting a Max width also converts the image, and with Keep format the result is PNG too, because browsers cannot write BMP files.
- Pick Output as and press Copy output.
The preview shows the original size and, after conversion, the new size next to it.
Why BMP makes huge Base64 strings
Most BMP files store every pixel as raw bytes with no compression. The size depends only on the dimensions, not on what the picture shows:
| Image | BMP file | BMP as Base64 | Same image as PNG |
|---|---|---|---|
| 32×32, 24-bit | 3,126 bytes | 4,168 chars | depends on content |
| 640×480, 24-bit | 921,654 bytes | 1,228,872 chars | depends on content |
| 800×500 screenshot of a settings list | 1,200,054 bytes | 1,600,072 chars | 23,085 bytes (30,780 chars) |
The last row is a real test with a simple UI-style image: PNG was about 52 times smaller, losslessly. Photos compress less, but PNG or JPEG still beat raw BMP by a wide margin. Unless the receiving system demands BMP, convert first.
When you still need BMP
Some systems only read bitmaps: older Windows software, some printer and kiosk software, embedded displays and microcontroller projects that blit raw pixels without a decoder. For those, keep the format and encode the file unchanged. If a device expects a specific bit depth, such as 1-bit monochrome or 16-bit, prepare the file in an image editor first; this tool keeps the original bytes as long as no image option is set.
What the Base64 of a BMP looks like
Qk02DAAAAAAAADYAAAAoAAAA...
That is a 32×32 24-bit BMP: BM, then the file size of 3,126 bytes, reserved bytes and a pixel data offset of 54. Other dimensions change the file size and with it the characters after Qk, which is why only the first two are a reliable marker.
If a device rejects the decoded file, compare the header: 32-bit BMPs with an alpha channel and BMPs with newer, larger info headers are typical reasons older readers refuse a file that opens fine on a PC.
To turn Base64 back into a .bmp file, use Base64 to BMP. For other image formats, Image to Base64 accepts anything the browser can read.
FAQ
Do browsers display BMP data URIs?
Yes, Chrome, Edge, Firefox and Safari all decode BMP in <img> and CSS. The format works, it is only wasteful.
Will converting BMP to PNG lose quality?
No. PNG is lossless, so every pixel stays the same. Only conversion to JPEG or lossy WebP changes pixels.
How do I recognize a BMP in Base64?
A BMP file starts with the letters BM, which encode to Qk. The next characters carry the file size, so the third character varies; Qk02 is a very common start.