Free · No upload · Runs in your browser

BMP to Base64 Converter

Drop a .bmp file and get a Base64 string you can paste into HTML, CSS, JSON, or a fixture file. Encoding runs entirely in your browser with FileReader.readAsDataURL() — the bitmap is never uploaded. Most desktop browsers can also preview BMP, so you can confirm the image before you copy.

100% client-side. Your bitmap never leaves your device.

Drop a BMP here

or click to browse · most browsers can preview BMP

What is BMP (and why it still shows up)

BMP (Bitmap) is a long-lived Windows image format. It is simple and widely supported in legacy toolchains, which is exactly why it refuses to die: scanner exports, fax middleware, ERP attachments, older design assets, and some industrial UIs still emit .bmp files.

Those pipelines often need the image as text next — an API field, a unit-test fixture, a CSS sprite experiment, or a single-file HTML demo. Base64 is the bridge: the bytes become ASCII you can paste anywhere binary uploads are awkward. You are not required to convert BMP to PNG first just to encode it.

How to convert a BMP to Base64

  1. Pick the file. Drag a .bmp onto the drop zone, or use the site-wide Image to Base64 tool.
  2. Choose the output shape. The same encode supports four paste targets (see next section).
  3. Copy once, paste once. Long strings break when messengers insert line wraps.

Prefer a modern format for web delivery? Encode PNG or JPG instead via PNG to Base64 or JPG to Base64.

Raw Base64 vs data URI — which shape to copy

BMP Base64 output shapes
DestinationCopy this
JSON / API field documented as “Base64 only”Raw Base64 (no data: prefix)
HTML <img src>Full data URIdata:image/bmp;base64,…
CSS background-imageurl("data:image/bmp;base64,…")
Quick archiveCopy the full string carefully

For API-oriented payloads, see Image to Base64 for API.

JavaScript snippet (FileReader)

If you are wiring this into your own page, the browser API is enough — no WASM decoder required for encoding:

<input type="file" id="bmp" accept=".bmp,image/bmp,image/x-ms-bmp">
<pre id="out"></pre>
<script>
document.getElementById('bmp').addEventListener('change', (e) => {
  const file = e.target.files && e.target.files[0];
  if (!file) return;
  const reader = new FileReader();
  reader.onload = () => {
    const dataUrl = reader.result; // data:image/bmp;base64,...
    const raw = String(dataUrl).split(',')[1] || '';
    document.getElementById('out').textContent =
      'DATA URI:\n' + dataUrl.slice(0, 80) + '...\n\nRAW:\n' + raw.slice(0, 80) + '...';
  };
  reader.readAsDataURL(file);
});
</script>

Size notes for BMP embeds

Uncompressed BMP is often much larger than the same picture as PNG or JPEG. Base64 then adds ~33%. Check size with the Base64 image size calculator. Prefer converting large bitmaps to PNG/JPEG first when the consumer accepts those formats. Keep BMP→Base64 for small icons, fixtures, and true legacy hand-offs. See also TIFF to Base64 and HEIC to Base64.

Troubleshooting

Preview works, paste fails in the app. You likely pasted a truncated string or the wrong shape (raw vs data URI).

MIME type looks wrong. Some systems expect image/x-ms-bmp instead of image/bmp.

File is huge. That is usually the BMP, not Base64. Compress or convert before encoding.

Frequently asked questions

Can I convert BMP to Base64 without uploading?

Yes. This page encodes in your browser with FileReader; the file stays on your device.

Do I need to decode BMP to PNG before Base64?

Not for encoding itself. Decode/convert only if the destination cannot handle BMP bytes after it Base64-decodes your string.

Is BMP good for web pages?

Rarely as a delivery format. Use BMP→Base64 when your source is BMP and you need text transport; prefer PNG/JPEG/WebP for public pages.

What MIME type does a BMP data URI use?

Usually image/bmp, producing data:image/bmp;base64,…. Some systems expect image/x-ms-bmp — adjust the header if they are strict.