GIF to APNG Converter

Decodes an animated GIF's LZW-compressed frames, palette, and per-frame delays, then re-encodes the sequence as a genuine Animated PNG (APNG) with full 24-bit color and alpha transparency, all client-side with no server upload. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-26

Overview

Introduction

This tool converts an animated GIF file into a real Animated PNG (APNG), entirely in your browser, giving the animation full 24-bit color and alpha transparency going forward.

Every frame is decoded, recomposited, and re-encoded locally; nothing you upload ever leaves your device.

What Is GIF to APNG Converter?

A client-side GIF-to-APNG converter that parses a GIF's LZW-compressed image data, local/global color tables, and Graphics Control Extension timing blocks to recover each animation frame, then builds a genuine APNG file from them using this category's shared APNG encoder.

The result is a standard PNG file with the acTL/fcTL/fdAT extension chunks that make it play as an animation in any APNG-aware viewer.

How GIF to APNG Converter Works

The GIF is parsed chunk-by-chunk to reconstruct its LZW dictionary and decompress each frame's indexed pixel data, then each frame's palette indices are resolved to RGBA colors (honoring each frame's transparent-index setting).

Those decoded RGBA frames are handed to this category's shared APNG encoder, which DEFLATE-compresses each frame's scanlines (via CompressionStream('deflate')) and wraps them in the acTL/fcTL/fdAT chunk structure the APNG spec defines.

When To Use GIF to APNG Converter

Use it when you want to preserve or improve an animation's color fidelity beyond GIF's 256-color palette, or need alpha transparency instead of GIF's all-or-nothing transparent index.

It's also useful for migrating older animated GIF assets into the more modern APNG format for sites and apps that support it.

Features

Advantages

  • Runs entirely client-side; the uploaded GIF is never sent to a server.
  • Produces a real, valid, standards-compliant APNG file that plays in any APNG-aware viewer.
  • Upgrades color depth from GIF's 256-color palette to full 24-bit RGB with 8-bit alpha.

Limitations

  • The resulting file is larger than the source GIF in most cases, since APNG's DEFLATE compression on full RGBA data is generally less compact than GIF's palette-indexed LZW compression for simple graphics.
  • APNG support in browsers and image viewers, while broad, is not universal the way GIF support is; verify APNG plays correctly wherever you intend to use it.

Examples

4-frame loading spinner

Input

A 64x64 animated GIF, 4 frames, 20-centisecond delay each

Output

A 64x64 APNG, 4 frames, 200ms delay each

Frame count and relative timing are preserved; color precision and transparency improve.

GIF with a transparent background

Input

An animated GIF using a single transparent palette index

Output

An APNG with fully transparent alpha-channel pixels in the same regions

GIF's binary transparent index maps directly to alpha 0 in the RGBA output.

Best Practices & Notes

Best Practices

  • Use this when you need APNG's better color fidelity or alpha transparency, not purely to reduce file size.
  • Check playback in your target environment, since APNG support varies more than GIF support across older software.

Developer Notes

GIF's LZW decompression and palette resolution are pure functions operating on the raw byte stream with no DOM dependency, fully unit-testable under Node; only the surrounding async wrapper touches the APNG encoder's CompressionStream-based DEFLATE step.

GIF to APNG Converter Use Cases

  • Upgrading a legacy animated GIF icon or badge to full-color APNG
  • Adding real alpha transparency to an animation that GIF could only fake with a hard-edged transparent index
  • Modernizing an animation asset pipeline from GIF to APNG

Common Mistakes

  • Assuming APNG output will always be smaller than the source GIF — for simple, low-color animations GIF's LZW compression is often more compact.
  • Deploying the resulting APNG somewhere that only renders the first static frame due to lack of APNG support.

Tips

  • Compare file sizes before and after — for photographic or gradient-heavy animations, APNG's better color depth often justifies the larger file size.
  • If your target platform doesn't support APNG, keep the original GIF as a fallback.

References

Frequently Asked Questions