How to convert an APNG to a GIF
- Load the PNG. Drop it on the box above, paste it, or pick the file, or try everything on the built-in animated sample first. The facts panel states what the file really is, read from its own bytes: an animated PNG (APNG) or a still, its dimensions, its frame count and its playing time per loop. A file that is not really a PNG (a GIF renamed to .png, say) is refused with that reason.
- Check the frame count. The facts panel states how many frames the APNG holds and how they were read, before you convert. If the file keeps a poster picture outside the animation, the panel says so; the poster is not a frame and is not converted.
- Choose the frames, colours and transparency cut. Keep every frame, or every 2nd or 3rd for a smaller file. Set the palette size and dithering, and where the one-bit transparency cut falls, or flatten onto a background colour. The plan above the button restates the whole conversion.
- Convert, check, download. The finished GIF appears in the preview from the actual file, and the status line reports its real size next to the APNG's. The file has already been re-read and verified at this point: dimensions, frame count, every frame's delay and the loop setting all match the plan.
How the frames are read
Reading a still PNG is easy: every browser decodes one natively. Reading an animated PNG frame by frame is the hard part of this tool, and the honest picture is this. An APNG stores most frames as small rectangles that changed, with rules for how each is blended over the picture so far and what happens to its rectangle afterwards. A browser's built-in image decoder only ever hands a page the file's main image, so a converter that draws the file through an ordinary image element gets one still picture, in every browser; that shortcut is how several converters quietly turn animations into stills.
This page reads the frames properly, with an APNG reader bundled with the page (a PNG decoder written in JavaScript, about 79 KB across two files, fetched only when an animated file actually needs it): the tool parses the file's animation chunks itself, decodes each frame's own rectangle with the reader, and composites the rectangles itself, applying the blending and disposal rules exactly. Because the reader is plain JavaScript rather than a browser feature, it behaves identically in Chrome, Edge, Firefox and Safari; the browser's own decoder is used only for still PNGs, which every browser has. The facts panel names the route that ran on your file, so the claim is checkable on the spot.
Timing and looping, carried over
An APNG stores each frame's delay as a fraction of a second (a numerator and a denominator, so 1/30 s is stored exactly); a GIF stores delays in hundredths of a second, and GIF players ignore or clamp very short delays. The rule this page applies, stated rather than hidden: each kept frame's delay is rounded to the nearest 10 ms, and anything under 20 ms is raised to 20 ms. A 100 ms frame stays 100 ms; a 33 ms frame becomes 30 ms; a 7 ms frame becomes 20 ms rather than the 100 ms a browser would otherwise stretch it to. When frames are skipped, their durations are folded into the kept frame before rounding, so the total playing time per loop is preserved.
The play count needs one translation, and it is done openly: an APNG's count is the total number of plays (1 means play once, 0 means forever), while a GIF's stored count means repeats after the first play (0 also means forever). This page converts the count so the total number of plays is preserved exactly: forever stays forever, play-once stays play-once, and an APNG that plays 3 times in total becomes a GIF that plays 3 times in total, not 4. Copying the stored number across without translating it would silently add a play to every finite animation.
Why 256 colours, and what banding is
A GIF frame does not store colours per pixel. It stores a palette of at most 256 colours and, per pixel, a pointer into that palette. An APNG frame holds any of millions of colours. When an animation holds more colours than the palette, the extras are mapped to the nearest survivors. On flat areas nothing changes, because flat colours are few and they all survive. On a smooth gradient or a photographic clip, thousands of in-between shades collapse onto a handful of entries, and the eye sees the joins as bands. This tool builds one palette from the whole animation's own pixels, shared across frames, so a colour means the same thing in every frame and does not shimmer between them. Dithering hides the joins under speckle; fewer colours make them wider and the file smaller. Neither is a defect of this tool: both are the format, and any converter that promises a photographic APNG will come through untouched is promising something the file cannot do.
Transparency: soft alpha becomes a cut
An APNG pixel carries an opacity from 0 to 255, and an animated PNG uses it fully: frames blend over each other with real alpha, and artwork carries soft shadows and feathered edges. A GIF pixel is transparent or it is not. This tool first composites the animation with its real alpha, exactly as a player shows it, and only then makes the one-bit cut: pixels under the threshold become transparent, pixels at or over it become solid. Where the cut falls changes the picture. A soft drop shadow under the threshold simply goes; at a lower threshold it survives, but as a hard-edged solid shape, because one-bit transparency also means its softness cannot survive. Flattening avoids the question by painting everything over a background colour first, the right choice when the GIF's destination page colour is known.
A worked example, with real numbers
These figures are from converting this page's own built-in sample through this tool, in a Chromium browser, at the default settings unless stated. The sample is an animated PNG of 10,616 bytes, 160 × 120 pixels, 12 frames, 1.20 seconds per loop, looping forever: a bouncing ball over a sky gradient, drawn for this site, with a soft shadow under the ball.
- At the defaults (256 colours, dithering on, threshold 128): the GIF is 32,221 bytes, 57 colours used, all 12 frames at their own delays. The sample's scene is opaque once its frames are composited (the ball's soft shadow blends into the ground it falls on), so no palette slot is spent on transparency; the transparency cut described above is for APNGs whose canvas itself has see-through pixels.
- At 32 colours: the GIF is 30,454 bytes, 31 colours used. The ball and the ground keep their flat colours exactly; the sky's gradient coarsens into visible bands, which is the trade the Colours setting makes everywhere.
- The size fact, plainly: an APNG compresses each frame the way a PNG does, so the same animation commonly comes out several times larger as a GIF. When the GIF that comes out is still too heavy for where it is going, the GIF Compressor can take it down further, including to a target file size.
Every conversion on this page reports its own real numbers the same way, so your file's result is never a guess from these examples: the status line states the output size next to the input's, whichever turned out bigger.
How big an APNG can you convert?
There is no server limit, because there is no server. But your browser's memory is a real limit, so the page states it plainly: files up to 50 MB, animations up to 600 frames, up to 8,192 pixels on a side, and up to 48 million pixels in one conversion (frames kept × width × height). The checks run before anything converts, and a plan over a limit is refused with the reason and the remedy. A still PNG, or a set of still images that should become one animation, belongs at PNG to GIF; an animated WebP converts at WebP to GIF; and the same journey in the opposite direction, GIF to animated WebP, lives at GIF to WebP.
Frequently asked questions
Does GIF keep the transparency of my APNG?
Mostly, with one format cut you control. An APNG pixel can be partly transparent, with 256 levels of opacity; a GIF pixel is see-through or solid, never in between. This tool composites your animation with its real transparency first, exactly as a player shows it, and only then makes the one-bit cut: a pixel whose opacity is under the Transparency threshold becomes transparent in the GIF, and every pixel at or over it becomes fully opaque. The default cut is 128, the halfway point. A soft shadow or a feathered edge therefore survives as a hard-edged solid shape, or drops away, depending on where you set the cut. Or choose Flatten, and the see-through areas are painted over a background colour you pick, which is what you want for a GIF that will sit on a known page colour.
What happens to an animated APNG?
It stays animated. Every frame inside the APNG is decoded, composited the way a player shows it (partial frames, blending and disposal included), and written into the GIF with its own delay, and the play count is carried over. This works in every modern browser because the page reads the frames with an APNG reader bundled with the page itself: a browser's built-in image decoder only ever hands over an APNG's main image, never its frames, which is why converters that lean on it quietly turn animations into stills. The facts panel states the frame count before you convert, so the claim is checkable on the spot. If your file keeps a poster picture outside the animation, as the format allows, the facts panel says so and the poster is not converted.
How long is the animation, and does it loop?
The GIF plays for the same length per loop as the APNG, up to one stated rounding: an APNG stores each frame's delay as a fraction of a second, a GIF stores delays in hundredths of a second, so each delay is rounded to the nearest 10 ms, and anything under 20 ms is raised to 20 ms because GIF players ignore or clamp shorter delays. A 100 ms frame stays 100 ms; a 33 ms frame becomes 30 ms; a 7 ms frame becomes 20 ms. Looping carries over with the total number of plays preserved exactly: an APNG set to loop forever makes a GIF that loops forever, an APNG that plays once makes a GIF that plays once, and an APNG that plays 3 times in total makes a GIF that plays 3 times in total (the two formats count plays differently, and the conversion translates the count rather than copying the number blindly).
Why is my GIF larger than the APNG?
Because a PNG compresses far better than a GIF, and it is not close. An APNG squeezes each frame with modern filtering and compression over a full colour range; a GIF stores palette indices from 1987, at most 256 colours per frame, with a simple compression scheme. The same animation routinely comes out several times larger as a GIF, and this page shows the two sizes side by side on every conversion rather than hiding it. The levers that actually help are on the page: fewer colours, keeping every 2nd or 3rd frame, and the GIF Compressor afterwards, which can take the finished GIF down further, including to a target file size.
Does converting an APNG to GIF lose quality?
It can, in two specific places, and both are the GIF format's limits rather than this tool's choices. Colours: a GIF frame holds at most 256 colours chosen from the animation's own pixels, so a gradient or photographic APNG will band where its shades are squeezed into the palette; dithering trades the bands for a fine speckle. Flat artwork with few colours often comes through pixel for pixel. Transparency: an APNG's soft, partly transparent edges are cut to solid or see-through at the threshold described on this page, so feathered edges harden. The motion itself (dimensions, frame order, timing, play count) carries over whole, and the preview after converting shows the actual GIF file, so what you see is exactly what you will download.
Related tools
Converting an APNG to a GIF is usually one step in a longer job. These MotionGIF tools cover the steps that tend to come before or after it:
PNG to GIF
Turn one PNG, JPG or WebP image into a still GIF, or a sequence of images into an animated GIF.
Open the tool →WebP to GIF Converter
Turn an animated WebP into an animated GIF with every frame, its timing and its loop kept, or a still WebP into a still GIF.
Open the tool →GIF to WebP
Convert an animated GIF into a true animated WebP, for when the GIF is the file that needs to shrink.
Open the tool →GIF Compressor
Make the GIF you just made smaller while it stays a GIF, with a target file size mode for strict upload limits.
Open the tool →