What Is BMP? The Bitmap Image Format Explained
You got a .bmp file from somewhere — an old Windows program, a scanner, a legacy system — and now you need to do something with it. This article covers what the BMP format actually is, why it creates enormous files, and how to convert it into something usable.
What Is a BMP File?
BMP (Bitmap Image File) is a raster image format developed by Microsoft in the late 1980s for Windows and OS/2. It stores pixel data in a straightforward grid: every pixel's color value is written sequentially, row by row, with minimal processing.
That simplicity was a feature in 1988. Programs could read and write BMP files without a decoder, and it worked across all Windows software. No compression needed, no encoding logic, just raw pixel data.
The trade-off: BMP files are enormous. A format designed for simplicity carries a permanent size penalty that modern formats solve entirely.
BMP is sometimes called DIB (Device-Independent Bitmap), which refers to the same format under a slightly different name used in Windows internals and clipboard operations.
BMP Format Specifications
BMP supports several color depth modes and two compression options. Here's what the format actually supports:
| Property | Details |
|---|---|
| Color depths | 1-bit (2 colors), 4-bit (16 colors), 8-bit (256 colors), 16-bit (65,536 colors), 24-bit (16.7M colors), 32-bit (16.7M colors + alpha) |
| Compression | None (most common), RLE-4, RLE-8 |
| Alpha channel | 32-bit BMP only (rare in practice) |
| Max dimensions | Technically ~2 billion × 2 billion pixels (limited by 32-bit signed integer) |
| Color profiles | Optional ICC color profile embedding (v4+ header) |
| Header versions | BITMAPCOREHEADER (12 bytes), BITMAPINFOHEADER (40 bytes, most common), BITMAPV4HEADER, BITMAPV5HEADER |
The RLE compression options (Run-Length Encoding) apply only to 4-bit and 8-bit images. For 24-bit photos — the most common BMP you'll encounter — there is no compression whatsoever. Every pixel is stored as three bytes, unmodified.
A 1920×1080 24-bit BMP works out to: 1920 × 1080 × 3 bytes = 6,220,800 bytes (~5.9 MB). The same image as WebP is typically around 200 KB. That's a 30× size difference for identical visual quality.
Where BMP Files Come From
BMP doesn't appear much in new software, but it still surfaces in predictable places:
Legacy Windows applications. Any Windows software written before the mid-2000s defaulted to BMP for image output. Paint, early versions of Office, and countless enterprise tools from that era used BMP as their native format.
Windows screenshot tools (old behavior). Early versions of Windows saved screenshots as BMP by default. Tools that hooked into older Windows APIs may still do this.
Scanners with legacy drivers. Scanner software bundled with older hardware frequently defaults to BMP or TIFF. BMP is simpler to write than TIFF, so lower-end scanner firmware often chose it.
Embedded systems and industrial equipment. Factory machines, medical devices, and other embedded systems often output BMP because it requires no encoder library — just write pixel data with a fixed header. These systems run firmware written decades ago that nobody wants to update.
Clipboard operations. When you copy an image in Windows, the clipboard stores it internally as a DIB (essentially BMP data). Some applications paste from clipboard and save that clipboard data directly as a .bmp file.
None of these are reasons to create new BMP files deliberately. BMP is something you encounter, not something you choose.
BMP vs Modern Formats
Here's how BMP compares to the formats you should actually be using:
| Format | Compression | Transparency | Typical Size (1920×1080) | Best Use Case |
|---|---|---|---|---|
| BMP | None (24-bit) | 32-bit only | ~5.9 MB | Legacy compatibility only |
| PNG | Lossless | Yes (full alpha) | ~1–3 MB | Graphics, screenshots, transparency |
| JPEG | Lossy | No | ~200–500 KB | Photos, photorealistic images |
| WebP | Lossy or lossless | Yes | ~100–300 KB | Web images (replaces both PNG and JPEG) |
| AVIF | Lossy or lossless | Yes | ~80–200 KB | Next-gen web images, best compression |
BMP loses on every axis except one: universal Windows compatibility for legacy software. If your destination is the web, email, or any modern application, BMP is the wrong format.
For a deeper comparison of the formats you should choose between, see Best Image Format for Web and PNG vs WebP.
Why You Should Convert BMP Files
Converting a BMP file isn't optional if you need to use it anywhere practical:
File size. A 5.9 MB BMP becomes a 200 KB WebP with no visible quality difference. At scale — product images, blog images, anything served over the web — this matters enormously for load times.
Browser support. BMP is technically supported by modern browsers, but serving BMP files over HTTP is a mistake. No compression means slow load times, higher bandwidth costs, and worse Core Web Vitals scores.
Email compatibility. Most email clients will not render BMP inline. The file gets treated as an attachment rather than an embedded image.
Storage. A folder of 100 BMP screenshots takes 600 MB. Convert them to PNG and you're looking at 50–150 MB. Convert to WebP and it's even less.
Editing software compatibility. While most professional tools open BMP, some web-based tools and mobile apps do not. PNG and WebP have near-universal support.
For a technical explanation of why compressed formats achieve smaller sizes, see Lossy vs Lossless Compression.
How to Convert BMP to PNG, JPEG, or WebP
Using Pixotter (recommended for web use): Pixotter's image converter handles BMP to PNG, JPEG, and WebP conversion entirely in-browser. Drop your BMP file, choose the output format, and download. No upload required — all processing runs locally via WebAssembly. If your BMP is large, you can also run it through Pixotter's compression tool after converting to further reduce file size.
Which format to choose:
- WebP — for web use. Best combination of size and quality. Supported by all modern browsers.
- PNG — if you need lossless output or transparency and the destination doesn't support WebP.
- JPEG — if the image is a photo and the destination requires JPEG specifically (some legacy CMSes, email systems).
Other options:
- Windows Paint — File → Save As → choose format. Limited to JPEG and PNG in modern Windows.
- GIMP — File → Export As → choose format. Free, handles batch conversion via Script-Fu.
- ImageMagick —
magick input.bmp output.webpfrom the command line. Efficient for batch processing.
For a single BMP file, Pixotter is the fastest path. For batch conversion of dozens or hundreds of files, ImageMagick's batch mode (magick mogrify) is the right tool.
FAQ
Can I open a BMP file on a Mac?
Yes. Preview opens BMP files natively. macOS supports BMP for reading but doesn't create BMP files by default. If you need to convert a BMP on Mac, Preview (File → Export) handles PNG and JPEG conversion, or use Pixotter for WebP.
Is BMP lossless?
Yes, 24-bit BMP preserves every pixel exactly as captured — there is no lossy compression applied. However, "lossless" does not mean "good." PNG is also lossless and produces files 3–5× smaller than BMP without any quality loss. BMP's lossless quality comes at an enormous file size cost.
Does BMP support transparency?
Only in 32-bit BMP, which includes an alpha channel. 32-bit BMP transparency is poorly supported in practice — most software that opens BMP either ignores the alpha channel or misinterprets it. If you need transparency, PNG or WebP are far more reliable choices.
Why is my BMP file so much larger than a PNG of the same image?
PNG applies DEFLATE lossless compression before saving. BMP (24-bit) writes raw pixel data with no compression. For a typical image with large uniform regions — a screenshot, a diagram, a logo — PNG compression ratios of 5:1 to 10:1 are common. The image content is identical; the encoding is dramatically different.
Are BMP files supported by web browsers?
Technically yes — Chrome, Firefox, and Safari all render BMP inline. Practically, you should never serve BMP on the web. No compression means every BMP file is substantially larger than its PNG or WebP equivalent, increasing page load time and bandwidth costs with zero benefit.
Can BMP files contain malware?
Any file can theoretically be crafted to exploit a vulnerable parser. Historically, BMP parsing bugs in Windows GDI have been exploited. This is not a reason to panic about BMP files from trusted sources, but it is a reason to keep Windows and image-processing software updated. Converting an untrusted BMP to PNG via a sandboxed converter (like Pixotter, which processes everything locally) before opening it in other software is a reasonable precaution.
What is the difference between BMP and DIB?
DIB (Device-Independent Bitmap) is the in-memory representation of BMP data used by Windows APIs. When you save a DIB to disk, it becomes a .bmp file with a small file header prepended. In practice, BMP and DIB refer to the same format — BMP is the file format, DIB is the Windows API name for the same data structure.
Should I ever use BMP for new projects?
No. There is no scenario in modern software development where BMP is the right output format. For lossless images: use PNG or lossless WebP. For photos: use JPEG or lossy WebP. For next-generation web: use AVIF. BMP is a format you encounter and convert, not one you create deliberately.