Skip to main content

PNG to GIF converter

Convert PNG images to GIF format

No watermarkFree & unlimited
All processing happens in your browser. No data is sent to any server.

This turns one PNG into one still GIF. The catch is colour: a GIF picture indexes into a palette, and the palette used here is the fixed 216-entry web-safe cube, with each channel snapped to 0, 51, 102, 153, 204 or 255. Every pixel is matched to its nearest cube entry by plain RGB distance, with no dithering to hide the jump. Flat artwork whose colours already sit on that grid converts perfectly; a photograph or a gradient will show visible bands. Nothing in this pair produces animation - a GIF made here holds a single frame.

Key facts about PNG to GIF converter

Key facts about PNG to GIF converter
PaletteFixed 216-colour web-safe cube, six evenly spaced levels per channel. The colour table is not built from your image, so unusual brand colours get rounded to the nearest cube point.
DitheringNone. Each pixel picks its closest palette entry independently, which keeps edges crisp and makes gradients band.
FramesExactly one. The file carries no Netscape looping block and no graphic control extensions, so it is a still picture in a GIF wrapper.
TransparencyNot preserved. No palette index is reserved as transparent, and since only RGB is read, a transparent PNG area is written as black.
CompressionStandard GIF LZW over the palette indices, computed in the page, with the code table reset when it reaches 4096 entries.
HeaderGIF89a with a 256-entry global colour table; the 40 entries past the cube are zeroed padding.
Size behaviourUnpredictable in a way other targets are not - a flat logo can compress below its PNG, while a photo usually lands larger because LZW cannot handle noisy index runs.
Colour ceiling216 distinct colours maximum against PNG's 16.7 million, which is why the tool shows an amber palette warning before you convert.
Opens natively inEverything - browsers, Windows Photos, macOS Preview, chat apps and email clients have read GIF for three decades.

What happens to your file

The palette matching and the LZW compression are both plain JavaScript running on this page, not a service and not a WebAssembly download. Your PNG is decoded by the browser into a canvas, getImageData returns the pixel array, a nearest-colour search maps each pixel to one of the 216 entries, and the encoder emits the GIF header, the colour table and the compressed image blocks into a Blob. The picture is never serialised to a request body, and no part of the pipeline needs a connection.

About this tool

  1. 1

    Select a PNG

    Flat-colour artwork, pixel art, diagrams and icons are the inputs this pair handles well.

  2. 2

    Read the palette notice

    The amber banner above the drop area is the honest summary: 256 colours is the format's ceiling and this encoder uses 216 of them.

  3. 3

    Resize if the GIF is for a chat or a forum

    The presets down to 200 px help, because index data compresses better at small sizes.

  4. 4

    Convert and inspect the flat areas

    Skies, drop shadows and soft gradients are where the banding appears first. Download the .gif when it looks acceptable.

Specs & compatibility
Input and outputTakes .png only (image/png) and returns .gif with the image/gif type; any other extension is refused before decoding.
Conversion pathPNG to GIF runs in three steps: an <img> element hands the file to the browser's own PNG decoder; the pixels land on a 2D canvas in this tab; then getImageData feeds a palette mapper and an LZW encoder that live in the page.
Browser supportThe PNG side decodes in every browser ever shipped, while writing the GIF needs nothing from the browser, the encoder shipping inside the page.
Controls for this pairNo quality slider, GIF not being a lossy target here, so the max-dimension presets from 3840 down to 200 px are the only way to hold the GIF down in size against the PNG.
Batch, caps and namingTwenty PNG files per run at 500 MB each; one result downloads as a single GIF, several as converted-gif-files.zip, zipped by JSZip 3.10 in page memory.
Device ceilingThe canvas caps it: past roughly 16,384 px a side Chromium refuses the bitmap and iPhone Safari gives up sooner, so an oversized PNG fails before any GIF bytes exist.
  • Snap your artwork's colours to the web-safe values before converting and the output will match the source exactly, because nothing has to be rounded.
  • A logo with a drop shadow is the worst case here: the shadow is both a gradient and, if it was transparent, a black smear.
  • When you only need wide compatibility rather than the GIF format itself, PNG is already universal and keeps all its colours.
  • Pixel art scaled up with the presets stays sharp in index space, so a 200 px sprite enlarged before conversion does not soften.
  • Producing a still GIF for a legacy forum, wiki or bulletin-board template that only accepts .gif uploads.
  • Making a small indexed asset for a retro-styled site or a game UI where the 216-colour look is the point.
  • Getting a diagram into an old document system whose image importer predates PNG support.
Not with this converter. It takes one still image and writes one frame - there is no frame list, no delay value and no looping block in the output. Building an animation needs a tool that accepts a sequence of images and writes timing information between them.
Because 216 colours have to stand in for millions, and no dithering is applied. A sky that passes through hundreds of blues gets snapped to the handful of cube entries nearest to it, so the transitions become visible steps. Photographs belong in JPG, WebP or AVIF; GIF was never built for them.
No. GIF can mark one palette index as transparent, but this encoder does not reserve one, and it reads only the red, green and blue channels. Transparent pixels come through with all three channels at zero, so they render black. Keep the PNG, or use WebP, if the cut-out matters.
Sometimes. Both use dictionary compression over a reduced set of values, so a two-colour icon can come out smaller as a GIF. Anything with texture usually comes out larger, because the banding creates irregular index runs that LZW handles badly while PNG's filters handle smooth data well.
Of this tool. The GIF format allows a 256-entry table chosen from your image's own colours, which a median-cut quantiser would build. This encoder uses the fixed web-safe cube instead, which is faster and completely deterministic but gives up the per-image fit.
View all

Need the opposite? Try GIF to PNG

Updated

We use anonymous analytics to improve ToolChamp. No personal data is stored or sold. Privacy Policy