What is a .BMP file?
The BMP file extension usually represents Microsoft Windows Bitmap or a DIB / BMP file, introduced by Microsoft in 1985 within some Windows graphics API for exchanging the device independent bitmap information in applications, drivers and clipboard. The BMP format stores pixel-based image in rectangle form, optionally including the image palette and does not preserve any layered information, vector data or animated content.
The common uses of BMP files are mostly for screenshots, application icons and resources, older texture in games, output from scanners, icons before conversion and legacy interchange images, while most of the BMP files are normally without compressions to allow quick opening and precise storage but taking much more disk space compare to PNG or JPEG.
However, in addition BMP could refer to earlier-used IBM and Microsoft OS/2 Bitmap format used for presenting image files in OS/2 Presentation manager. The files of Windows and OS/2 BMP formats have the same first two bytes BM at byte 0 of the BMP format, within the 14-byte file header. The differentiating part of BMP formats is DIB Header after these initial 14 header bytes where Windows BMP format uses sizes of 40 / 108 / 124 and OS/2 12/64 headers. As the different version of BMP formats created in the various programs there had to be some support from viewers for such aspects like bottom up/top down row organization, different palettes etc.
How to open a .BMP file
Open a .BMP file on Windows
- 1 Go to the folder with your file in File Explorer. Usually, downloaded files end up in Downloads.
- 2 Double-click your .BMP file if you have an app for .bmp files on your computer. In case it does not open, move on to step three.
- 3 Right-click your .BMP file -> select .
- 4 Choose Microsoft Paint in the list (Windows 11: choose Always). For Windows 10 -> put a check on "Always use this app to open .bmp files" and click OK.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for Windows
- Microsoft Paint free
- Microsoft Photos free
- GIMP open-source
- Adobe Photoshop paid
- IrfanView freemium
- Krita open-source
- Paint.NET free
- XnView MP freemium
Open a .BMP file on macOS
- 1 In the Finder app, locate your .BMP file.
- 2 Just double-click your .BMP file in order to automatically launch the program which is connected with it.
- 3 Need another app on your Mac? Control-click the file (or right-click with a mouse). In the pop-up menu select .
- 4 If it isn't in the list, choose and find the application manually.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for macOS
- Apple Preview free
- GIMP open-source
- Adobe Photoshop paid
- Krita open-source
- GraphicConverter paid
- XnView MP freemium
- ImageMagick open-source
Open a .BMP file on Linux
- 1 Launch your file manager. Depending on the desktop it may be named Files (GNOME), Dolphin (KDE Plasma), Nemo (Cinnamon) or Thunar (Xfce).
- 2 Double-click the file.
- 3 Or choose another program by right-clicking the file -> .
- 4 Install GIMP (if it is not installed on your computer) from the software centre, repository or Flathub.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for Linux
- GIMP open-source
- Krita open-source
- XnView MP freemium
- ImageMagick open-source
Open a .BMP file on Android
- 1 Launch Files or another file management app.
- 2 In Downloads, find the .BMP file and open it by tapping.
- 3 A list of apps capable of opening the file will be shown. Tap Adobe Photoshop and press Always to permanently connect the file type with this app.
- 4 No apps able to open this file? Download Adobe Photoshop from the Google Play Store.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for Android
- Adobe Photoshop paid
- Krita open-source
- Google Photos freemium
Open a .BMP file on iPhone / iPad
- 1 Use the Files app and go to On My iPhone, iCloud Drive or Downloads.
- 2 Tap the .BMP file you want to open.
- 3 If the file can be opened by a built-in iOS app (supported format), it opens automatically.
- 4 Touch and hold the file to get the context menu -> choose -> select Adobe Photoshop from the list of apps.
- 5 If there is no such option, download the app first from the App Store and then tap the document again.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for iPhone / iPad
- Adobe Photoshop paid
- Google Photos freemium
Open a .BMP file online
- 1 Move to the online viewer at the top of this page.
- 2 Drag the file there or select it, and its contents will appear in your browser tab. The file is not uploaded.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for Online
- Adobe Photoshop paid
- Photopea freemium
- Google Photos freemium
More details about opening .BMP files
On the Windows OS family, regular BMP files will open with either the default Microsoft Paint or Microsoft Photos. The Paint program has editing options available and also allows for saving the image in such image formats as PNG, JPEG, GIF, TIFF, and BMP. In case your file isn't opening through double-clicking, select "Open with" and use Paint or Photos; you can even use alternative editing tools such as IrfanView or paint.net.
Preview on MacOS will open BMP files and also convert files to PNG, JPEG, TIFF, PDF, and different others. GraphicConverter should be used on legacy forms of BMP files as well as when doing batch jobs. Big files require enough memory and using a desktop-based MAC system, because uncomressed pixels of one such file might take up hundreds of megabytes.
Common choices for opening BMP files under Linux include GIMP, ImageMagick, XnView MP, Krita, Gwenview, and Eye of GNOME. ImageMagick will do just fine in scripting inspections and conversions, too. In case your file cannot be opened, try running the XnView MP application or ImageMagick's identify command first.
On your Android phone, Google Photos as well as Krita may be able to render some BMP files, but gallery application often lack BMP support due to low frequency of these files usage under Androids platform. On iOS and iPadOS, you will be capable of viewing lots of BMP files using Google Photos and applications belonging to the Photoshop family. In case Files app preview is unable to display your bmp file - convert the image with a desktop tool or Photopea.
If your BMP doesn't open in the browser at all, verify the first bytes of the BMP file read 42 4D, then try ImageMagick or XnView MP. Photopea will do a pretty good job at opening and modifying this format while you use nothing more than your browser.
Technical details
Windows BMP file is a binary rather than text based file format. Its normal structure is a BITMAPFILEHEADER which consists of 14 bytes, followed by DIB header, size determining its variation, then optional BitMasks or palette, optional ICC profile information in more modern Windows headers, and finally Pixel Data. Its typical marker would be "BM" at byte position 0 which corresponds to values 42 4D as its ASCII representation. In BITMAPFILEHEADER structure, it has little-endian 32 bit representation of the file size, while another little-endian 32 bit value contains the offset to the PixelData.
The most common depths per pixel include 1 bit per pixel, 4 bits per pixel (which means it has 16 colors), 8, 16, 24, and 32 bits per pixel. Bitmap with index-colors uses some Palette, usually with depth of one, four, or eight bits. Usually, 16-bit or 32 bit Bitmaps use some Bitmasks instead of palettes and uses BI_BITFIELDS constant for this particular case. The most commonly used BMP image types are RLE and BI_RGB. The former is used in the following cases - for 4 bit-per-pixel BMP in BI_RLE4 and 8 bit-per-pixel for BI_RLE8.
All BMP image rows are padded to a 4-byte boundary. Usually, positive height means bottom-up organization and opposite way of organization means negative height. Compared to JPEG or PNG or TIFF, Metadata is quite poor. BITMAPV4 or BITMAPV5 headers can hold ColorSpace in it, BITMAPV5 header can also use embedded/external ICC Profiles. The most common mime type is 'image/bmp' even though some legacy systems could have image/x-ms-bmp, image/x-bmp mime type.
How to convert .BMP files
Use BMP to PNG conversion whenever you want lossless compression, convenient usage on the Web, a transparent background, or smaller image size while preserving original pixel values intact. PNG is best to keep the borders sharp when saving screenshots, icons, and UI graphics, and typically decreases the BMP file size significantly. Use ImageMagick on a command line: magick input.bmp output.png. Put such commands in shell loops in the case of several files at once or into shell scripts to handle all BMP files located in your directories automatically.
JPEG is better for photographs, email sending, and Web publishing when file size is more important than exact accuracy. Use the following ImageMagick command: magick input.bmp -quality 90 output.jpg. Avoid using the latter format for screenshots, text graphics, icons, drawings, because lossy compression causes edge blurring and lack of transparency support. Save BMP images with high precision and more data for scanning purposes as TIFF files via this ImageMagick command: magick input.bmp output.tif. You'd better not use JPEG for long storing because higher bit-depth data will be lost; only the original color information will be kept. Use ImageMagick to prepare the BMP screenshots as the ICO file by creating BMP squares in several sizes (such as 256, 128, 64, 48, 32, 16 pixels). After you convert BMP files into ICO format, please examine their transparency properties. Use Preview, Paint, GIMP, Photoshop, XnView MP, and Photopea tools for further editing of Bitmap pictures. Crop, modify pixel data in color modes (such as grayscale, palette), or pick export settings.
| Convert to | Tool | Command / note |
|---|---|---|
| PNG | ImageMagick | magick input.bmp output.png Best general lossless replacement; preserves sharp edges and transparency when present, usually much smaller than BMP. |
| JPEG | ImageMagick | magick input.bmp -quality 90 output.jpg Good for photographs and web sharing, but lossy; transparency, exact pixels, and high bit depth may be lost. |
| WebP | ImageMagick | magick input.bmp -quality 85 output.webp Modern web format; can be lossy or lossless and is typically much smaller than BMP. |
| TIFF | ImageMagick | magick input.bmp output.tif Useful for archival or print workflows; can retain high bit depth and use lossless compression. |
| ICO | ImageMagick | magick input.bmp -define icon:auto-resize=256,128,64,48,32,16 output.ico Creates Windows icon files from a bitmap, generating common icon sizes. |
| PNM/PPM | Netpbm | bmptoppm input.bmp > output.ppm Simple intermediate format for Unix image pipelines; metadata and compression are not preserved. |
| PNG | ffmpeg | ffmpeg -i input.bmp output.png Works for single images or numbered BMP sequences; useful in video-frame workflows. |
Common problems and fixes
"File is not a valid bitmap file," or "file format is not supported" usually indicates that the file is not a BMP, its header is corrupted, or the file uses some rare variant of a BMP file. The first two bytes in such case should start with 42 4D ("BM"). Test the header using ImageMagick magick identify input.bmp. Black image, inversion, or shifting of colors occur when using an unsupported bit mask, ignoring the alpha channel, mixing BGR with RGB, or when an old application interprets a BITMAPV4HEADER or BITMAPV5HEADER as the simple 40-byte header.
Upside down images usually appear due to wrong interpretation of the BMP height or of the conventional bottom-up row order in BMP images by the viewer. You should open the BMP image in GIMP or ImageMagick and save it as PNG. In case one end of the image is completely blank, this occurs since the file contains incomplete pixel data; compare the file size against width × height × bytes per pixel plus the header and palette. Usually, RLE-compression breaks basic viewers of BMP images; hence you need to convert them using XnView MP, GIMP or ImageMagick. Or you might ask the source program to output uncompressed BMP/PNG images.
Sometimes very large BMP files cause problems with "not enough memory." This is explained by usage of a lot of memory space by uncompressed raster images. For solving the issue, it is suggested to downscale them or to tile with an appropriate software. When having problems opening a .BMP file on a Windows PC, this occurs due to incorrect file association. Solve this problem using , or right-click and Open with. Website rejection of your file means that it accepts only JPEG, PNG, GIF, or WebP images.
Security considerations
A BMP file does not have macros, scripts, forms or executable code, since BMP is a raster image and a BMP decoder may crash due to maliciously manipulated sizes and palettes, among other elements. Make sure you install security updates to Windows, macOS and their web browers as well as image manipulation programs and operating systems, like Paint, Preview, GIMP, and ImageMagick, etc. Handle BMPs the same way as other binaries, as an unusually huge size reported by the file may drain memory or stop automation pipes. Risk of data privacy breach is minimal, except in some BITMAPV4HEADER or BITMAPV5HEADER files with color profiles. Screenshot could expose the names of UI and files viewed. Do not rename your downloaded file into anything like "image.bmp". There should not be a need for "image.bmp.exe". Verify 42 4D bytes at offset 0 and check width and height numbers before any processing.
History and versions
The origins of Windows Bitmap come from MS Windows 1.0 of 1985 and IBM and Microsoft OS/2 graphic technologies of 1987. It came from GDI (Graphics Device Interface) device-independent bitmaps and permitted pixel-by-pixel rendering on various screen or printer types with no need for image rewrite. The early versions of OS/2 operating system, and Windows 2.x used BITMAPCOREHEADER of 12 bytes while BITMAPINFOHEADER of 40 bytes became an accepted standard through version Windows 3.0. Following BMP evolution introduced BITMAPV4HEADER and BITMAPV5HEADER for RGB bit mask support, calibrated color space support, and gamma and ICC Profile support.
BMP is described in numerous books, which include documentation from Microsoft company for Win32 and GDI API; although it is not covered within one standard ISO format BMP is still widespread enough to be regarded as an open technology. Its most useful purpose comes up in the area of desktop wallpapers and other similar things, before the PNG and JPEG came into usage. BMP has found the wide area of usage with its advantages, such as desktop background and use in applications that require exact copy of bitmap.
Related formats
BMP (.bmp), however, has a close competitor PNG (.png). In addition, it gives an improved level of compression, manages alpha-transparency well, and is a normal file format of screenshot graphics, icons and user interface imagery and web graphics. On the one hand, JPEG or JPG (.jpg, .jpeg), makes significantly smaller file sizes for photographs, but, at the same time, this file format is not suitable for pixel accurate, crisp text, graphic lines or transparency because it is lossy. On the other hand, a TIFF (.tif, .tiff) format has additional functionality relative to BMP format and can often be found in scanning, printing, archival saving, multiple pages documents creation, high bit depth, and a wide range of metadata.
WEBP (.webp), and AVIF (.avif) are advanced formats with lossy and lossless compression that allow using of alpha-channeling and have, in general, smaller size in comparison with BMP format but require updated versions of programs for work. ICO (.ico) file type may hold Windows icon images generated from BMP images. DIB is the bitmap structure including header plus pixels in API usage.
No comments yet. Be the first to share your experience with this file type.