Convert ICO to BMP

Converting ICO to BMP writes the largest picture from the icon container as an uncompressed 24-bit bitmap — the plain baseline variant that every Windows reader accepts. There is no alpha channel in that format, so transparent areas are filled with a colour you choose, and the file grows considerably.

  • Where it runs In your browser. The file is never uploaded.
  • Lossy The colours survive exactly. BMP cannot carry transparency, so anything cut out is filled with the background colour.
  • File size limit Up to 100 MB per file, free, without an account.
  • Worth knowing Transparency is not supported by the target format and is filled with the background colour.

Up to 100 files at once. Mixed formats are fine.

What ICO to BMP actually does

ICO 139 KBBMP 450 KB 3.2× larger

A photographic scene — smooth gradients, soft edges, grain. This is the case BMP is designed for or against, and the figures show which. Both images are drawn in code and encoded by the same converter that runs on this page, so the sizes are this site's own output.

ICO 7 KBBMP 450 KB 64.4× larger

A transparent background and a gradient across the shape. BMP either keeps both, keeps one, or fills the transparency with a solid colour — which is the difference that catches people out. Both images are drawn in code and encoded by the same converter that runs on this page, so the sizes are this site's own output.

ICO 3 KBBMP 450 KB 175.2× larger

Flat colour and hard edges, as in an interface, a chart or a logo. Very different behaviour from the photograph above, and the reason the answer is "it depends what is in the file". Both images are drawn in code and encoded by the same converter that runs on this page, so the sizes are this site's own output.

The two formats are close relatives, and the icon kept the alpha

Both come from Microsoft and they were designed together. The original icon format did not wrap a separate image at all: each entry held a bitmap header followed by colour data and a one-bit mask saying which pixels to leave alone. An ICO was, quite literally, bitmaps in a directory with a stencil attached.

The two then diverged. Icons gained a proper eight-bit alpha channel with Windows XP and the ability to carry a PNG payload with Vista, which is what modern icon files use for their large entries. The bitmap written by this converter is the 24-bit baseline, which never gained either. Converting one to the other is therefore a step backwards in capability, undertaken because something on the other end needs it.

The alpha channel is filled in before the bitmap is written

The encoder writes 24 bits per pixel: eight of blue, eight of green, eight of red, and nothing else. There is a BMP header variant that defines an alpha channel, and files using it exist, but almost nothing reads it reliably — which is exactly the reliability problem BMP is usually chosen to avoid.

So the transparency has to go somewhere before the encoder runs, and the background setting decides where. White is the default. Choose the colour of whatever surface the bitmap will be drawn on: an installer banner background, the panel colour on an embedded display. On a test icon with transparent corners the result read 255,255,255 in the corner, which is correct and is also the wrong answer if the panel is dark grey.

Expect the file to grow by more than twenty times

This is not a fault and it is the whole reason BMP exists. Every pixel occupies three bytes regardless of what it is, so the file size is arithmetic rather than a result: width times three, rounded up to a multiple of four, times height, plus 54 bytes of header.

For a 256-pixel square that is 768 bytes per row and 196,608 bytes of pixels, giving 196,662 in total. Measured against the 8,471-byte test icon it came from, the bitmap is more than twenty-three times the size. If the destination has a size limit, do that multiplication before you convert rather than after.

Which of the icon’s drawings becomes the bitmap

The largest one in the file. Decoding is done by your browser’s icon reader, which returns the biggest entry in the directory — checked by building a file with 16, 32, 48 and 256 pixel drawings in four different colours and converting it with the directory written in three different orders. The 256-pixel drawing came out every time.

The smaller entries are not written anywhere and there is no setting that reaches them. If the software you are feeding wants a 32-pixel bitmap and the icon holds a 32-pixel entry, an icon editor such as GIMP will export that layer directly, which is a better result than scaling the 256-pixel version down.

Rows bottom to top, and channels in the wrong order

Two details worth knowing if you are reading the bytes rather than opening the file. BMP stores its rows from the bottom of the image upwards, and it stores each pixel as blue, then green, then red. Both are in the specification and both regularly surprise somebody parsing one for the first time.

Each row is also padded to a multiple of four bytes, which matters at odd widths: a 33-pixel-wide bitmap has 99 bytes of colour per row and one byte of padding, making the stored row 100. At 256 pixels the row is 768 bytes and no padding is needed, which is one reason icon-sized bitmaps are easy to work with by hand.

Why anything still asks for an uncompressed bitmap

Because reading one requires no decoder. A microcontroller driving a small display can copy bytes from a file into a framebuffer with a loop and a header offset; adding a PNG decoder to that firmware means adding a decompressor, a memory allocator and a chunk parser to a device that may have 32 KB of RAM.

The same reasoning applies to installer resources, to older Windows controls that load resources through the platform’s own bitmap functions, and to test fixtures that want to compare images byte for byte without a codec in the way. In all of those, predictability is worth far more than size.

Nothing about the picture is degraded on the way

Both formats are lossless, and this path has no quality setting because there is nothing to trade. Every pixel that survives the flattening is bit for bit what the icon stored, so converting the same file twice gives identical output and there is no generation loss to worry about if it passes through the step again later.

The two things that are genuinely lost are the alpha channel, replaced by the background colour, and the other entries in the container. Neither is recoverable from the bitmap afterwards, which is the argument for keeping the original icon file rather than replacing it.

When to push back and supply a PNG instead

If the destination is modern software with a stated preference rather than a hard requirement, a PNG is smaller by two orders of magnitude and keeps the transparency. The same test icon was 1,737 bytes as a PNG against 196,662 as a bitmap — a difference large enough to be worth one email asking whether BMP is genuinely required.

Where the answer is yes — firmware, an installer script, a fixture with a byte-level comparison — the bitmap is correct and the size is the price of being readable without a decoder. Say that in the commit message, because a 200 KB file for a small icon looks like a mistake to whoever reviews it next.

Converting a folder of icons for an installer or a panel

Drop the whole set. Each file is decoded, flattened onto the same background colour and written out separately, with everything returned as a ZIP. A shared background across the batch is usually what these destinations need, since the images are being composited onto one surface.

Check the dimensions in the result rather than assuming they match. Icon sets built up over years mix entries that reach 256 pixels with ones that stop at 32, and the bitmaps inherit that spread — with a factor of sixty-four between the file sizes at the two extremes.

How to convert an ICO file into a BMP

  1. Drop your ICO file onto this page, or click to choose one.
  2. Set the background colour that replaces the transparent areas.
  3. Download the uncompressed 24-bit BMP.

ICO against BMP: a compressed container against raw rows of pixels

ICO compared with BMP
ICOBMP
Full nameWindows IconWindows Bitmap
File extension.ico.bmp, .dib
Media typeimage/x-iconimage/bmp
CompressionLossless — nothing is discardedUncompressed
First published19851987
Published byMicrosoftMicrosoft
LicensingPublished, not standardisedPublished, not standardised
Standing todayNicheLegacy, still read everywhere
Bit depth88
Colour it can describeRGB, indexed paletteRGB, indexed palette
Largest image256 px per side
Opens in a browserEvery browserEvery browser
Considered insteadPNG, SVGPNG, TIFF

What is lost

BMP has no alpha channel. A transparent ICO comes out with those areas filled in — white unless something else is set — and no setting in BMP brings the transparency back.

Opening the result

GIMP reads both ICO and BMP, so there is a way to check the result against the original without a second tool.

File size and quality

BMP stores the samples raw, so the file grows substantially without gaining anything. It is the right direction only when a program on the far side refuses ICO, which is the usual reason for doing it.

What each format is for

The two are aimed at different work: ICO at the web, BMP at moving data between programs. That is worth weighing before converting, because the reason one exists is usually the reason the other is awkward.

ICO is Microsoft's format, published in 1985. It records 8 bits per channel.

BMP comes from Microsoft and dates from 1987. Microsoft Paint, GIMP and IrfanView all read it.

ICO to BMP: transparency, file size and Windows compatibility

Does the icon keep its transparency in the BMP?

No. The bitmap written here is 24-bit — eight bits each of blue, green and red and no fourth channel — so transparent pixels are filled with the background colour before encoding. White is the default and the background setting changes it.

Why is the BMP so much larger than the icon?

Because nothing is compressed. Every pixel takes exactly three bytes whatever it contains. A 256-pixel square is 196,608 bytes of pixel data plus a 54-byte header; on a test file an 8,471-byte icon became a 196,662-byte bitmap.

What are the dimensions of the bitmap?

The size of the largest picture inside the icon, capped at 256 pixels by the ICO format. If the icon holds only a 32-pixel entry, the BMP is 32 by 32 and about 3 KB.

Is the image degraded by the conversion?

No. Both formats store pixels losslessly, so every colour value that survives the flattening is exactly what the icon held. The only loss is the alpha channel and the smaller entries in the container.

Which BMP variant is written?

The plain uncompressed baseline with a BITMAPINFOHEADER: rows stored bottom to top, channels in blue-green-red order, each row padded to a multiple of four bytes. That is the variant every reader accepts, which is the point of choosing BMP at all.

Is the file sent to a server?

No. The icon is decoded and the bitmap assembled in your browser, which also means there is no upload waiting on a 200 KB file that started as 8 KB.

More about these formats