BMP to Base64 Converter
Batch convert BMP images to Base64 encoded strings
Drop a BMP file and get a Base64-encoded data URL you can paste straight into <img> tags, CSS background-image, JSON payloads, or email templates. Batch mode lets you convert a whole folder of BMPs in one go — each file gets its own copyable output string. And everything runs in your browser. Nothing gets uploaded.
How It Works
Your browser’s FileReader API reads the BMP as binary data, then converts each 3-byte chunk into 4 ASCII characters using the Base64 alphabet. The result gets wrapped in a data:image/bmp;base64, prefix so it’s ready to paste straight into your code. No server involved — the encoding happens entirely in memory on your machine.
Examples
Embedding a favicon in an HTML email
Email clients strip external image links half the time. Inline the logo instead.
logo.bmp (16×16, 822 bytes)
data:image/bmp;base64,Qk02AwAAAAAAADYA...
Storing a screenshot in a JSON config
You’re building a test fixture and need a reference image baked into the JSON file. No external dependencies, just one self-contained file that any CI runner can pick up.
button-hover.bmp (48×48, 6.9 KB)
data:image/bmp;base64,Qk12GgAAAAAAADYA...
(~9.2 KB text, +33% overhead)
CSS background for a texture pattern
Tiny repeating tile, no extra HTTP request.
grain-4x4.bmp (78 bytes)
background: url(data:image/bmp;base64,Qk1OAAAA...) repeat;
Who Uses This
Inline small icons and sprites directly in HTML or CSS to cut HTTP requests on performance-critical pages.
Embed logos into email templates so they actually show up, even when clients block remote images.
Pack reference screenshots into JSON test fixtures — one file, zero external dependencies.
Drop inline images into Markdown docs so the file is fully self-contained and portable.
Common Mistakes
BMP files are uncompressed, so a 1920×1080 image can easily be 6 MB. Base64 adds 33% on top of that — you’d end up with 8 MB of text in your HTML. Convert to PNG or WebP first, then Base64-encode the smaller file.
Raw Base64 text won’t render in an <img> tag. You need the full data:image/bmp;base64, prefix before the encoded string. This tool includes it automatically, but if you’re trimming the output, don’t cut that part off.
If you converted a PNG to BMP before encoding, the data URL still says image/bmp. That is correct — the binary data is BMP format now. But if you want the original format, encode the original file instead of the converted copy.
Technical Details
- Processing: 100% client-side (FileReader API)
- Browser Support: Chrome, Firefox, Safari, Edge
- Output Format: Data URL with
image/bmpMIME type - Size Overhead: ~33% larger than the original binary
- Batch Support: Multiple BMP files at once
Frequently Asked Questions
How do I convert a BMP image to Base64?
Drop your BMP file into the upload area on this page, then click “Convert All.” The tool reads the file locally in your browser and outputs a data URL string you can copy. No software to install, no account needed.
Why is my Base64 string so much bigger than the original BMP?
Base64 encoding uses 4 characters to represent every 3 bytes, so the output is always about 33% larger. On top of that, BMP is already uncompressed — a 5 MB bitmap becomes roughly 6.7 MB of text. For anything over a few KB, convert to PNG or WebP first, then encode.
Can I use a Base64 BMP in an HTML img tag?
Yes. Paste the full data URL (starting with data:image/bmp;base64,) into the src attribute of an <img> tag. All modern browsers will render it just like a regular image file. Works in CSS background-image too.
Is there a file size limit for BMP to Base64 conversion?
There is no hard limit since everything runs in your browser, but practically speaking, files over 5–10 MB will slow things down and produce enormous text strings. Most use cases for Base64 images involve small assets — icons, thumbnails, UI elements under 50 KB.
Are my BMP files uploaded to a server?
No. The conversion happens entirely in your browser using the JavaScript FileReader API. Your files never leave your device. You can verify this by disconnecting from the internet — the tool still works.
Convert BMP images to Base64 encoded data URL strings. Perfect for embedding in HTML img tags, CSS backgrounds, JSON APIs, and emails. Copy individual results or all at once. All processing runs in your browser — nothing is uploaded to any server.