★ Every tool runs 100% in your browser. Nothing is uploaded, ever

Convert Formats

GIF to APNG Converter

This free GIF to APNG converter runs in your browser and keeps the whole animation: every frame of your GIF is decoded, written into an animated PNG with its exact timing, and the play count is translated so the total number of plays is preserved. Nothing is uploaded: the decoding and the APNG writing both happen on your device, and before the download appears, the finished file is re-read, composited and compared pixel by pixel against your GIF.

Two format facts are worth knowing before you start, because no converter can repeal them. The conversion is lossless, but lossless is not an improvement: the APNG holds your GIF's own pixels, with its 256-colour ceiling and its on/off transparency exactly as they are. And an APNG is often about the same size as the GIF or larger, never the dramatic shrink people hope for; both facts are stated again where they bite, with measured examples below.

Drop a GIF here, or paste one from your clipboard

A built-in sample GIF is already loaded, so you can try the conversion first.

Your GIF & APNG settings

The two formats count plays differently (a GIF stores repeats after the first play, an APNG stores total plays), so keeping the GIF's looping means translating the count, not copying the number. The readout states the play count that was written.

The contents are identical either way; only the name changes. Choose .apng when a tool or a person asks for that ending, and .png for everything else.

Honest limits, checked before anything is converted: files up to 50 MB · animations up to 600 frames · up to 8,192 px on a side · up to 48 million pixels in one conversion (frames kept × canvas width × height). A plan over a limit is refused with the reason and the remedy, not with a frozen tab.

Your GIF, then your APNG

Your GIF will appear here once it loads.

After converting, the finished APNG appears here, from the actual file you will download.

How to convert a GIF to an APNG

  1. Load the GIF. Drop it on the box above, paste it, or pick the file, or try everything on the built-in sample first. The facts panel states what the file really is, read from its own bytes: its dimensions, its frame count, its playing time per loop and its looping. A file that is not really a GIF (a PNG renamed to .gif, say) is refused with that reason.
  2. Choose the frames, the looping and the name. Keep every frame, or every 2nd or 3rd for a smaller file. Keep the GIF's own looping (translated so the total plays survive), or force loop forever or play once. Pick the file name ending, .png or .apng; the contents are the same either way. The plan above the button restates the whole conversion.
  3. Convert, check, download. The finished APNG appears in the preview from the actual file, and the status line reports its real size next to the GIF's. The file has already been re-read and verified at this point: dimensions, frame count, every frame's delay and the play count match the plan, and its composited frames match your GIF pixel by pixel.

How the conversion works

A GIF frame is rarely the whole picture: frames are often small rectangles with rules for what happens to each rectangle afterwards. So the first step is the one every MotionGIF tool shares: the site's own GIF engine decodes your file into full frames, applying those disposal rules the way a player does, so what gets converted is the animation as it is actually seen, not a pile of rectangles. The facts panel's frame count comes from that decode, before anything is written.

The writing is done by an APNG writer bundled with the page (a PNG encoder written in JavaScript, about 79 KB across two files, fetched only when you convert): the same library this site already uses to read APNGs in the APNG to GIF tool, run in its other direction. It is called losslessly, with no colour reduction: when a job's colours fit a palette it stores one, and otherwise it stores truecolour frames, but either way the stored pixels are your GIF's own. Because the writer is plain JavaScript rather than a browser feature, it behaves identically in Chrome, Edge, Firefox and Safari, and the file it makes is the same in all of them. Two things the writer leaves generic, this tool sets itself in the finished bytes: the play count, and each frame's delay as the exact fraction described below, with the chunk checksums recomputed so strict readers accept the file.

Timing and looping, carried over exactly

This direction has the easier timing story of the pair, and it is worth stating plainly: nothing is rounded. A GIF stores each frame's delay in hundredths of a second; an APNG stores each delay as a fraction of a second, so a GIF delay converts exactly: 10 hundredths is written as 1/10 of a second, 25 hundredths as 1/4, 7 hundredths as 7/100. When frames are skipped, their delays are added into the kept frame before writing, in whole hundredths, so the total playing time per loop is preserved to the centisecond. (The rounding story you may have read about on the APNG to GIF page belongs to that direction, where fractions have to land on the GIF's coarser grid.)

The play count needs one translation, and it is done openly: a GIF's stored count means repeats after the first play (0 means forever, and no count at all means play once), while an APNG's count is the total number of plays (1 means play once, 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 a GIF stored with 3 repeats becomes an APNG set to 4 plays in total, not 3. Copying the stored number across without translating it would silently drop a play from every finite animation.

Lossless, and what that does not promise

Lossless means the APNG holds exactly the pixels the GIF holds, and this page proves it on your file rather than asking you to trust the word: after writing, the APNG is decoded again, composited, and compared against the GIF's frames pixel by pixel, and only a file that matches is offered for download. What lossless cannot do is add anything. A GIF frame holds at most 256 colours, picked when the GIF was made; photographic GIFs carry dithering speckle where their shades were squeezed into that palette. All of it, the flat colours and the speckle alike, is carried over faithfully, because it is the picture. If what you actually want is a better-looking or smaller animation, converting formats will not give it to you; the honest routes are in the related tools below.

Transparency: hard edges stay hard

An APNG pixel can be partly transparent, with 256 levels of opacity. A GIF pixel cannot: it is solid or see-through, and that is all the source information there is. So the APNG keeps the GIF's transparency exactly as it is, hard edges included: see-through pixels stay see-through (stored with an opacity of 0), solid pixels stay solid (opacity 255), and no in-between opacity is invented to fake a softer edge. A feathered edge in the APNG would have to be made up, and this tool does not make up picture data. If your GIF's edges look rough, they will look the same in the APNG, because they are the same pixels.

The size truth: often the same, sometimes larger

People reach for this conversion hoping the file will shrink, so the honest picture matters. PNG compression is genuinely stronger than GIF compression, and on a large, flat-coloured scene the APNG commonly comes out smaller, as the worked example below shows. But every APNG frame carries its own chunk structure, so an animation of many small frames pays that cost on every frame; and a dithered, photographic GIF is mostly noise, which no compressor squeezes. Those APNGs come out about the same size as the GIF, or larger. The status line on this page always prints both sizes side by side, so the result is never a surprise after the fact. When size is the actual problem, the APNG is the wrong destination: keep the GIF and shrink it, or convert to animated WebP, which was designed to beat GIF sizes.

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. The sample is the bouncing-ball scene the MotionGIF tools share, as a GIF of 15,357 bytes: 320 × 200 px, 12 frames, 1.20 seconds per loop, looping forever.

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 a GIF 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. The same journey in the opposite direction, animated PNG back to GIF, lives at APNG to GIF; a still image that should become a GIF belongs at PNG to GIF; and the smaller animated format lives at GIF to WebP.

Frequently asked questions

Does APNG keep the transparency of my GIF?

Yes, exactly as far as the GIF has it. A GIF pixel is solid or see-through, never in between, and the APNG keeps it that way: see-through pixels stay see-through, solid pixels stay solid, with the same hard edges the GIF has. What the conversion cannot do is soften those edges. There is no half-transparent pixel in a GIF to carry over, so no feathered edge appears in the APNG either. Before the download appears, the finished file is re-read and compared pixel by pixel against the GIF, transparency included, so the claim is checked on your actual file rather than promised in general.

Why is my APNG larger than the GIF?

It often is, and the page shows both sizes on every conversion instead of hiding it. Two things push the APNG up: every frame carries its own PNG chunk structure, so an animation of many small frames pays that cost many times over, and a dithered or photographic GIF stores noise that no compressor squeezes well. The same animation can also come out smaller, because PNG compression is stronger than GIF compression on large flat scenes: this page's own sample shrinks, and the worked example below shows a tiny-frames GIF that grows, both measured. If the file size is the real problem, an APNG is usually the wrong tool: the GIF Compressor shrinks the GIF itself, and GIF to WebP makes a smaller animated file in a format built for it.

Does converting a GIF to APNG lose quality?

No. The conversion is lossless: every pixel of every frame is carried over exactly, and the finished APNG is re-read, composited and compared pixel by pixel against the GIF before the download appears. But lossless is not the same as an improvement, and no honest converter should sell it as one. A GIF frame holds at most 256 colours, chosen when the GIF was made, and any dithering speckle in the source is baked into its pixels. The APNG keeps all of that faithfully; it cannot restore colours, detail or soft transparency the GIF never had. What you gain is the format itself: a file that the tools asking for an animated PNG can read, with the animation whole.

How long is the animation, and does it loop?

The APNG plays for exactly the same length per loop as the GIF. A GIF stores each delay in hundredths of a second and an APNG stores each delay as a fraction of a second, so the conversion is exact rather than rounded: a 10 hundredths delay is written as 1/10 of a second, a 25 hundredths delay as 1/4. Looping is translated so the total number of plays is preserved exactly: a GIF that loops forever makes an APNG that loops forever, a GIF that plays once makes an APNG that plays once, and a GIF stored with 3 repeats (4 plays in total) makes an APNG set to 4 plays in total. If you want different looping, the Looping setting on this page overrides it, and the readout states what was written.

Why does the APNG have a .png extension?

Because an APNG is a PNG. The file is an ordinary PNG with animation chunks added, which is the format's whole design: any program that reads PNGs can open it, and one that knows nothing about animation simply shows the first frame as a still picture. Nothing about the contents changes with the name. Some people prefer the ending .apng so the file announces itself as animated, and some tools ask for that name, so this page lets you choose the ending before you convert; the file inside is identical either way.

Related tools

Converting a GIF to an APNG is usually one step in a longer job. These MotionGIF tools cover the steps that tend to come before or after it:

Browse all MotionGIF tools →