Convert Bitmap To Data Uri Online
Convert Bitmap To Data Uri online. All processing happens in your browser.
Drop image here or click to upload
Max 50MB • 100% Private
Drop a BMP file and get back a base64 data URI you can paste straight into your CSS, HTML, or email template. Skips the hassle of hosting another tiny image file just for a favicon or button icon.
And everything runs in your browser. Nothing gets uploaded.
How It Works
Your browser reads the bitmap file using the FileReader API, converts the raw binary data into a base64 string, then wraps it in the data:image/bmp;base64, prefix. The resulting URI can go anywhere a normal image URL would — CSS background properties, <img> src attributes, or inline in an HTML email.
Examples
Embedding a Favicon in HTML
You want a single-file HTML page with no external dependencies — perfect for a quick demo or a status page.
favicon.bmp (16×16, 822 bytes)
<link rel="icon" href="data:image/bmp;base64,Qk02A...">
CSS Background for a Button Icon
A 24×24 arrow bitmap that you want baked into your stylesheet so it loads instantly with the CSS file.
arrow-right.bmp (24×24, 1.8 KB)
background-image: url(data:image/bmp;base64,Qk12B...);
Inline Image in an HTML Email
Email clients like Outlook block external images by default. Embedding a small logo as a data URI means it shows up without the recipient clicking "Load Images."
company-logo.bmp (120×40, 14.4 KB)
<img src="data:image/bmp;base64,Qk024E..." alt="Logo">
Who Uses This
Embed tiny icons and UI sprites directly in CSS to cut HTTP requests on performance-critical pages.
Inline logos and buttons in HTML emails so they display without "Load Images" prompts.
Quick-test bitmap assets in CodePen or Figma prototypes without setting up file hosting.
Submit single-file HTML homework assignments with embedded images — no broken links when the teacher opens it.
Common Mistakes
Base64 adds roughly 33% to the file size. A 500 KB bitmap becomes a ~667 KB string stuffed into your HTML or CSS. Keep data URIs for images under 10–15 KB — anything bigger should be a regular file.
A BMP file needs data:image/bmp;base64, — not data:image/png. Wrong MIME type and the browser won't render it. This tool handles that automatically, but if you edit the string by hand, double-check it.
Data URI strings for bitmaps can get long. If your text editor wraps or truncates the line, the image breaks silently. Always copy the full output — a partial base64 string just shows a broken image icon.
Technical Details
- Processing: 100% client-side — no server upload
- Browser Support: Chrome, Firefox, Safari, Edge
- Input Formats: BMP, plus most common image formats (PNG, JPG, GIF, WebP)
- Output: RFC 2397 data URI with base64 encoding
- Size Overhead: ~33% larger than the original binary file
Frequently Asked Questions
What is a data URI?
A data URI is a way to embed file data directly in a URL string using base64 encoding. Instead of pointing to a file on a server, the URL contains the actual image data. Browsers decode it on the fly and display the image as if it came from a regular URL.
Is there a size limit for data URIs?
Technically, modern browsers handle data URIs up to several megabytes. But that doesn't mean you should push it. Anything over 10–15 KB is usually better served as a regular file. Large data URIs bloat your HTML, slow parsing, and can't be cached separately by the browser.
Why convert BMP specifically instead of PNG or JPG?
Sometimes you're stuck with a BMP — legacy software, hardware scanners, or old asset libraries that only export bitmap. Rather than adding an extra conversion step (BMP to PNG, then to data URI), you can go straight from BMP to data URI here.
Do data URIs work in all email clients?
Most modern email clients support them, but not all. Gmail strips data URIs from emails. Outlook desktop supports them in some versions. Apple Mail handles them fine. Test your specific target clients before relying on data URIs in email campaigns.
Is my image uploaded to a server?
No. The conversion happens entirely in your browser using JavaScript. Your file never leaves your device. You can even disconnect from the internet after loading the page and the tool still works.