Lottie to APNG

Convert a Lottie animation to an animated PNG. Unlike GIF, an APNG keeps full truecolour and a real 8-bit alpha channel, so gradients do not band into visible steps and soft edges do not fringe against the background — GIF has exactly one bit of transparency, which is why its edges always look cut out. The timing is computed so the rounding adds up rather than drifting slower every loop. And because an APNG is a valid PNG file, anything too old to read the animation shows the first frame instead of a broken image. Everything renders in your browser and nothing is uploaded.

APNG against the alternatives

APNGGIFWebM
ColoursFull truecolour256Full truecolour
Transparency8-bit alpha1 bit, fringesAlpha in VP9
File sizeLargeMediumSmall
Needs a playerNoNoVideo element
If unsupportedShows first frameBroken imageNothing plays

When to use it

  1. Put an animation on a page without a JavaScript player.
  2. Use an animated logo or icon over a coloured or photographic background.
  3. Replace a GIF whose edges fringe or whose gradients band.
  4. Make an animated sticker or emoji that needs clean transparency.
  5. Produce an animation that degrades to a still frame in old software.

How to Use

  1. Drop a .json or .lottie file.
  2. Set the size and frame rate, and keep transparency or pick a background colour.
  3. Choose lossless for gradients, or quantise for a smaller flat-colour file.
  4. Make the APNG and download it.

Features

  1. Full truecolour, no palette banding
  2. Real 8-bit alpha, no fringed edges
  3. Optional 256-colour quantisation
  4. Any output size and frame rate
  5. Exact timing, no loop drift
  6. Transparent or solid background
  7. Falls back to the first frame in old viewers
  8. Runs in your browser, nothing uploaded

FAQs

Why use APNG instead of GIF?

Two reasons, both visible. GIF stores one bit of transparency, so every pixel is either fully opaque or fully clear and soft edges fringe against whatever is behind them. And GIF is limited to 256 colours, so gradients band into visible steps. APNG has a full alpha channel and full truecolour, so neither happens.

Why use APNG instead of a video?

Because it needs no player, no autoplay permission and no muting, and it keeps transparency — which almost no video format does in a browser. The trade is file size: an APNG is much larger than an equivalent video.

What does the quantise option do?

It reduces the image to 256 colours, which shrinks the file substantially. It also gives up much of what makes APNG worth choosing, so it is best used for flat-colour animations where there is no gradient to band in the first place.

Will it work everywhere?

Every current browser plays APNG. Older software that does not understand the animation chunks shows the first frame, because an APNG is a valid PNG — so the worst case is a still image, not a broken one.

Why is there a minimum size?

Below about sixteen pixels the encoder's frame-differencing breaks down and writes a file that claims more frames than it actually contains, which some decoders render as a single still. No real animation is that small, but the size control can reach it, so it is blocked.

Why is my file so big?

APNG compresses each frame losslessly, so it is far larger than a video of the same animation. Fewer frames per second, a smaller output size, or the quantise option all help — and if you do not need transparency, a WebM or MP4 will be a fraction of the size.

Is my animation uploaded?

No. It is rendered and encoded entirely in your browser.

Technical Details

Frames are rendered one at a time through lottie-web's canvas renderer with `goToAndStop` rather than captured during playback, so a busy tab cannot drop a frame out of the result, and each frame's RGBA bytes are copied off the canvas before being handed to the encoder. APNG is then written with full truecolour and an 8-bit alpha channel, which is the entire reason to prefer it to GIF: GIF stores a single bit of transparency, so every pixel is either wholly opaque or wholly clear and soft edges fringe against whatever sits behind them, and its 256-colour palette bands any gradient. A quantised mode is offered for when size matters more, and it is described honestly as giving up exactly that advantage. Per-frame delays are computed so the rounding adds up: at 30 fps a flat 33 milliseconds per frame loses ten milliseconds every second, which accumulates into a loop that visibly drifts slower than the source, so the remainder is distributed across frames and the total duration comes out exact. There is a minimum output size, because below roughly sixteen pixels the encoder's inter-frame differencing collapses and emits a file whose animation-control chunk claims several frames while the file carries only one frame-control chunk and no frame data at all — malformed, and shown by some decoders as a still image. The render is also checked for coverage when transparency is on: if no frame contains a single opaque pixel then the renderer drew nothing, and the export stops with an explanation instead of producing an animation of empty frames. The practical advantage of the format is that an APNG is a valid PNG, so anything that cannot read the animation chunks shows the first frame rather than a broken image.

Lottie & Animation Tools

Lottie & Animation Tools

  • Lottie Metadata Viewer
  • Lottie Accessibility Analyzer
  • Lottie Optimizer
  • Lottie to dotLottie
  • dotLottie to Lottie
  • Lottie Player & Embed
  • Lottie Color Editor
  • Lottie JSON Editor