Skip to content
ImageRuns in your browser

APNG to GIF

Convert APNG to GIF and get an animation that plays everywhere, right in your browser.

Upload
Single file · 40 MB max
Privacy
Nothing is uploaded
Cost
Free · no sign-up · no watermark

Loading tool…

The tool is loading its code on your device. This happens once and is cached for later visits.

Processed entirely on your device

Your file is read, transformed and re-encoded inside this browser tab using JavaScript. There is no upload endpoint — nothing leaves your machine, nothing is stored, and the result is created as a local object URL that disappears when you close the page.

Overview

About the APNG to GIF

Convert APNG (animated PNG) to GIF free online. The animation plays in your browser while a canvas captures it frame by frame, then gifenc writes the GIF locally.

APNG is the better animation format: full colour, real alpha, no 1987 constraints. It is also the format almost nothing outside a browser will play — which is why an APNG to GIF conversion keeps being needed for chat, markdown, office documents and comment systems. This tool performs that conversion entirely in your browser: the animation is captured as it plays and re-encoded locally, with nothing to install and nothing to upload.

How the APNG to GIF capture works

Every current browser decodes and plays APNG natively, so this APNG to GIF tool does not ship a decoder. Instead it reads the animation's timing straight from the file's chunk list — frame count and per-frame delays, without touching pixel data — then plays the file in a hidden element and photographs it off a canvas at your chosen sample rate. gifenc quantises and writes the result.

What carries over in an APNG to GIF conversion, and what does not

An honest APNG to GIF conversion report starts with what survives the trip:

  • Loop length: the total duration is read from the source's own frame delays, so the GIF runs for as long as the animation did — but at a uniform sample rate rather than the original per-frame timing.
  • Geometry: dimensions scale to your chosen width with the aspect ratio preserved, and a source narrower than that width is left alone rather than enlarged.
  • Colour: this is the loss. Twenty-four-bit colour becomes 256 indexed colours per frame, and soft alpha becomes a white card.
  • Play count: not carried over. An APNG authored to loop three times and stop produces a GIF that loops forever.

Choosing an APNG to GIF sample rate

Sample rate is the single biggest quality lever in an APNG to GIF conversion. Match the source frame rate when you know it — most APNGs are authored at 10–24 fps. Sampling below the source rate drops frames and makes fast motion judder; sampling above it captures duplicate frames and inflates the file for nothing.

What the APNG to GIF chunk walk reads

Before anything is captured, this APNG to GIF converter reads the file as a sequence of chunks — each one a length, a four-character type, its payload and a checksum. The walk verifies the eight-byte PNG signature first and refuses anything that does not begin with it, which catches files renamed to .png from something else entirely. It then steps through the chunk list looking only at fcTL blocks: the animation control chunks that carry each frame's size, position and delay.

Delays are stored as a numerator and a denominator, so a frame can be timed as finely as one twenty-four-thousandth of a second. A denominator of zero means 100 ticks per second, exactly as the APNG specification says, and that case is handled rather than guessed at. The walk stops at IEND. Pixel data — the IDAT and fdAT chunks where all the weight of the file actually lives — is never opened, which is why a 40 MB animation reports its frame count and loop length instantly.

Two refusals come out of this stage, both with plain messages: a file that is not a PNG at all, and a PNG carrying fewer than two fcTL chunks, which is a still image with nothing to animate.

One rounding rule is applied on the way through. Any frame delay below 20 ms is counted as 20 ms, because GIF expresses delays in hundredths of a second and players have always rounded anything shorter upward. An animation authored at 60 fps therefore reports a loop about a quarter longer than a browser plays it. That is a property of the destination format, and it is better surfaced in the readout than discovered afterwards.

Timing in an APNG to GIF conversion: resampled, not copied

The probe produces one number that matters here: how long a loop takes. The capture then photographs the playing animation at the uniform rate you chose, so individual frame timings are not transferred — they are re-derived from that total. An animation that dwells on one frame and races through the next comes out evenly paced, over the same overall length. This is the one stage where an APNG to GIF conversion genuinely rewrites the file rather than copying it.

For most APNGs that is invisible. Spinners, stickers and reaction loops are authored at a constant rate anyway, and a 3.4-second animation at the default 10 fps is captured as 34 frames at 100 ms and plays for 3.4 seconds. Longer animations meet the same 90-frame budget as the video tools: past nine seconds at 10 fps the sample step widens and the delay widens with it, so the loop still runs at the speed it was authored at rather than racing through.

What is not read at all is the source's play count. An APNG can be told to loop three times and stop; the GIF written here always carries the standard infinite-looping extension.

The real-time APNG to GIF trade, stated plainly

Capture runs at wall-clock speed: a three-second animation takes three seconds to convert. For the lengths APNGs are actually authored at — a few seconds of spinner, sticker or reaction — that is a non-issue, and it is what keeps the tool decoder-free and fully local.

A private APNG to GIF workflow

Everything about this APNG to GIF converter is local by design. The animated PNG you drop in is read, played and photographed by the browser you are already using, and the GIF is written by JavaScript in the same tab — there is no server stage, no queue and no account. That matters for the files that typically need an APNG to GIF conversion: loading spinners for an unreleased product, stickers and reaction animations still under licence discussion, internal mock-ups whose dimensions you would rather not publish. None of them ever leave the machine. Drop the file, read the frame report, press convert, download the loop.

Step by step

How to use the APNG to GIF

  1. Drop an animated .png onto the upload area; the frame count and loop length appear immediately.

  2. Choose a sample rate and output width — matching the source fps keeps motion smooth.

  3. Press Convert to GIF. The animation plays once in a hidden element while it is captured.

  4. Download the GIF when the capture completes; it loops forever like the original.

Why use it

Benefits and common use cases

What this tool is good for, and what it deliberately does not try to do.

Plays everywhere afterwards

APNG support is universal in browsers but nearly absent elsewhere: chat apps, markdown renderers and office software ignore the extra frames. GIF is the format those places actually animate.

No decoder shipped

Your browser already plays APNG natively, so the animation is simply photographed off a canvas as it plays — no codec library to download and no server to trust.

Upfront frame report

The chunk walk reads the animation's frame count and loop duration before anything is captured, so you know exactly what you are converting — and static PNGs are refused early.

Questions

Frequently asked questions

Short, honest answers about quality, limits and privacy.

Why does the conversion take as long as the animation?

Because the capture is real time: the browser plays the APNG in a hidden element and a canvas photographs it at your sample rate. A four-second loop takes about four seconds to capture. It is the honest price of not bundling a decoder.

My PNG was refused as “not animated”. Why?

The tool walks the PNG chunk list looking for animation control chunks. A file with fewer than two frames is a static image, and converting it to a one-frame GIF would achieve nothing — so it is refused with that explanation.

Is quality lost converting APNG to GIF?

Colour, yes, where the source needs it. APNG carries 24-bit colour and 8-bit alpha per frame; GIF allows 256 colours per frame, and the file this tool writes carries no transparency at all — transparent regions are composited onto white before encoding. Smooth gradients and soft shadows band or dither. Loop length and geometry carry over.