Upload a file
  1. base64hub
  2. Image tools
  3. BMP to Base64

BMP to Base64

Drop a .bmp file and copy it as Base64 or a data URI. Bitmaps are uncompressed, so converting to PNG before encoding often makes the string dozens of times shorter.

Free no sign-up, no limits Local nothing uploaded PNG lossless conversion before encoding Updated Oct 27, 2026
Drop an image here, paste one, or pick it
Input –Output –Size –

Processed in your browser. This page cannot send your data anywhere – how we know

How to convert BMP to Base64

  1. Drop a .bmp file on the box or choose it with the file picker.
  2. To keep it as a bitmap, leave the image options alone and the original bytes are encoded.
  3. 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.
  4. 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:

ImageBMP fileBMP as Base64Same image as PNG
32×32, 24-bit3,126 bytes4,168 charsdepends on content
640×480, 24-bit921,654 bytes1,228,872 charsdepends on content
800×500 screenshot of a settings list1,200,054 bytes1,600,072 chars23,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.