Convert BMP to GIF

Converting BMP to GIF is a compatibility job. A bitmap can hold sixteen million colours and a GIF holds 256, so what happens next is decided by the picture: flat artwork comes through unchanged, a photograph comes back banded. It all runs in your browser.

  • Where it runs In your browser. The file is never uploaded.
  • Lossy Some detail is traded for size. GIF cannot hold everything a BMP can.
  • File size limit Up to 100 MB per file, free, without an account.
  • Worth knowing Reduced to 256 colours, which is visible on photographs.

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

What BMP to GIF actually does

BMP 450 KBGIF 36 KB 12.4× smaller

A photographic scene — smooth gradients, soft edges, grain. This is the case GIF 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.

BMP 450 KBGIF 8 KB 59.9× smaller

A transparent background and a gradient across the shape. GIF 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.

BMP 450 KBGIF 6 KB 72.9× smaller

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.

GIF has 256 colours and a bitmap has sixteen million

That is the whole of this conversion. A 24-bit BMP stores an actual colour for every pixel — three bytes, one per channel, sixteen and a half million possibilities, written out in an order that betrays the format’s age: rows bottom to top, channels blue then green then red. A GIF stores an index into a palette instead, and the palette holds 256 entries. Everything else on this page follows from that one difference.

It is a limit in the format rather than a setting, which is why there is no control for it. GIF89a dates from 1989 and CompuServe published the first version in 1987, when 256 colours was what a screen could show. The registry marks it legacy for exactly that reason, and it remains in use because a great deal of software has read it for nearly forty years. BMP comes from the same world — Microsoft published it in 1987 as well — which is why the two turn up together in old systems and why this conversion is more often a migration than a choice.

How a bitmap’s colours are reduced to 256

Something has to decide which colours survive, and doing it badly is what gives GIF conversions their reputation. Rounding each channel to a fixed grid is the naive method and it turns a photograph into visible steps regardless of what was in it.

The encoder here quantises by popularity within a k-d tree — the same family of algorithm ImageMagick uses — so the palette is built from the colours the image actually contains rather than from a generic grid. The palette is computed in a reduced colour space to keep it fast, which costs a little accuracy; for a format that ends at 256 colours that trade sits heavily on the side of not making you wait. The practical effect is that the palette follows your picture: a bitmap that is mostly one brand blue spends most of its 256 entries on shades of that blue, which is what makes flat artwork survive intact.

There is no dithering, and that is deliberate

Dithering is the other way to handle a palette: instead of snapping each pixel to the nearest available colour, scatter two neighbouring colours in a pattern so that the eye averages them and the band disappears. It is what made 256-colour screens tolerable in the 1990s, and it is not applied here.

The reason is that it moves the damage rather than removing it. A dithered GIF trades smooth bands for visible speckle, and because the pattern breaks up the long runs of identical pixels that the format compresses, the file grows as well — worse to look at and larger, on material that was already the wrong material. On flat artwork, where this conversion actually belongs, there is nothing to dither in the first place.

Flat artwork survives; gradients do not

A logo, an icon, a diagram, a chart, a scanned line drawing or a screenshot of an interface typically contains a few dozen distinct colours. All of them fit in the palette, and the GIF is indistinguishable from the bitmap. That is the case this conversion is good at, and it is also the material most BMP files contain.

A photograph is the opposite. A sky is a continuous gradient of hundreds of subtly different blues, and reducing it to a handful produces the bands the registry lists as the format’s known problem. The banding is most visible exactly where a picture is smoothest — skies, skin, studio backgrounds, anything softly lit — and no setting on this page prevents it. A useful test before converting a batch: open the bitmap and look for any area where the colour changes gradually across more than a few dozen pixels. Every one of those is somewhere a step will appear.

A still GIF is what a single bitmap can produce

GIF is the format people associate with animation, and BMP holds exactly one image. So the output is a single-frame GIF: a still picture in a container capable of more, which is a perfectly valid file and not what some people arrive expecting.

If the goal is an animation, the input has to be several images or a video. Converting one bitmap after another and hoping they combine does not work — each conversion produces its own independent file, and nothing here assembles frames.

Neither side of this pair carries transparency

GIF can be transparent in one coarse sense: a single palette entry may be nominated as invisible, with no partial levels. The encoder here nominates none, so every pixel of the file you download is opaque — the format’s one bit is not used, let alone the 256 levels a PNG would give you.

It rarely comes up from a bitmap, which is the other half of the answer. A BITMAPV5HEADER can describe an alpha channel and 32-bit files carrying one exist, but they are rare enough that this site treats BMP as an opaque format, and this pair offers no background colour to pick. If one does arrive with transparency the browser reports, it is filled with white before the palette is built. Where a cut-out has to survive, PNG keeps it on both ends and is the conversion to use instead.

What the GIF will weigh next to the BMP

Much less, in nearly every case. The bitmap spends three uncompressed bytes on every pixel, while the GIF spends one palette index and then compresses the run of indices — and flat artwork, which is mostly long runs of the same index, compresses extremely well.

The comparison that matters is not against the BMP, though. Almost anything beats three uncompressed bytes per pixel, so a comparison against the source flatters every target on this site equally. It is against the alternatives that GIF has to argue: for a photograph, a JPEG or a WebP of the same picture will be smaller than the GIF and look far better, because a lossy photographic codec is built for exactly the material a palette cannot describe. GIF wins on compatibility and on nothing else.

What still requires a GIF today

Systems with a fixed list of accepted formats, written when that list was short: older forum and wiki software, some mail and newsletter templates, embedded and industrial interfaces, and internal tools nobody has touched in a decade. Occasionally a specification or an assignment names the format outright.

All of those are requirements rather than preferences, which is the honest framing for this page. Nobody chooses GIF for a still image on its merits any more, and a page that suggested otherwise would be describing 2005. It is worth confirming that the requirement is real before working around it, because "GIF" is sometimes shorthand in a document nobody has revised since the list was written. If the system accepts a PNG when one is offered, the whole of this page becomes unnecessary and the result is better.

PNG is the better target unless GIF was named

PNG keeps every colour in the bitmap, keeps 256 levels of transparency instead of one, is lossless, is read by everything and is usually smaller than the GIF on the same flat artwork. It replaced GIF for still images decades ago and did so on the merits.

So the decision procedure is short. If something told you it needs a GIF, this page is correct. If you are choosing, choose PNG — and if the source is a photograph and the destination is a web page, choose WebP and skip both.

Converting bitmaps to GIF on your own machine

The bitmap is decoded by the browser and the palette and the GIF are built in the same tab, so nothing is uploaded and there is no queue. The ceiling is 100 MB per file, roughly 33 megapixels of uncompressed bitmap.

Drop a folder and each file is quantised and encoded in turn, keeps its name with the extension swapped, and the set comes back as one ZIP. Quantisation is the slowest step here, so a batch of large images takes longer than the file sizes suggest — setting a maximum width, if the destination does not need the full dimensions, cuts both the time and the output. Since the systems that still require GIF are generally old ones displaying small images, that reduction is usually free in every sense.

How to convert a BMP into a GIF

  1. Check whether the picture is flat artwork or a photograph — that decides the result.
  2. Drop the BMP onto this page and let it quantise.
  3. Look at the GIF before you use it, especially in any smooth areas.

BMP and GIF: true colour against a palette of 256

BMP compared with GIF
BMPGIF
Full nameWindows BitmapGraphics Interchange Format
File extension.bmp, .dib.gif
Media typeimage/bmpimage/gif
CompressionUncompressedLossless — nothing is discarded
First published19871987
Published byMicrosoftCompuServe
SpecificationGIF89a
LicensingPublished, not standardisedOpen standard
Standing todayLegacy, still read everywhereLegacy, still read everywhere
Bit depth88
Colour it can describeRGB, indexed paletteindexed palette
Largest image65,535 px per side
Opens in a browserEvery browserEvery browser
Considered insteadPNG, TIFFWebP, MP4

What is lost

GIF stores at most 256 colours per frame. A photograph converted into one is reduced to a palette, which is what makes the sky look stepped rather than smooth — it is the format, not a quality setting.

Opening the result

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

File size and quality

GIF packs the same samples into roughly half the space. Nothing is discarded — decode it and you get the BMP back bit for bit — which makes it the better shelf for anything you intend to keep.

What each format is for

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

BMP is Microsoft's format, published in 1987. It records 8 bits per channel.

GIF comes from CompuServe and dates from 1987, specified as GIF89a. GIMP, Adobe Photoshop and ImageMagick all read it.

BMP to GIF: colours, transparency and whether it is worth it

Are my BMP files uploaded anywhere?

No. This conversion runs entirely inside your browser, so the file never leaves your device. You can confirm it yourself: open the network tab of your browser's developer tools and convert something. You will see the page load, plus the analytics and advertising the site is paid for with — and nothing carrying your file. The engine behind this particular pair is jSquash, WebAssembly builds of the reference image codecs; your browser fetches it once and caches it.

How many colours does the GIF keep?

256 at most, out of the sixteen million a 24-bit bitmap can hold. That is a limit in the format itself, not a setting — GIF stores an index into a palette rather than a colour, and the palette has 256 entries.

Will my image look worse?

It depends entirely on the material. A logo, an icon, a diagram or a screenshot of an interface usually has fewer than 256 colours to begin with and comes out identical. A photograph or anything with a gradient will show visible banding where a smooth transition has to become a series of steps.

Can I get an animation out of a single BMP?

No. GIF supports animation and a BMP contains exactly one image, so what you get is a still GIF — a single frame in an animated container. Making an animation needs several images and a different tool.

Can the GIF have a transparent background?

No. GIF allows one palette entry to be nominated as invisible and the encoder here nominates none, so the result is opaque throughout. It seldom matters from this source, because BMP is treated as an opaque format and no background colour is offered on this pair; a 32-bit bitmap whose alpha the browser does report is filled with white before the palette is built.

Will the GIF be smaller than the BMP?

Almost always, and often dramatically — a bitmap costs three bytes per pixel with no compression at all, while a GIF stores one palette index per pixel and compresses those. For a photograph, though, a JPEG or WebP of the same picture will be smaller and look far better.

Should I use PNG instead?

Unless something specifically requires GIF, yes. PNG keeps every colour, keeps 256 levels of transparency, is lossless and is read by everything. GIF is a compatibility answer, not a quality one.

More about these formats

Where these figures come from

The claims this page makes about BMP and GIF are checkable, and these are the documents that settle them.