APNG to Webp Converter

Decodes an APNG's frames and delays, re-encodes each frame with the browser's own WebP encoder, and hand-assembles the compressed frames into a real animated WebP (RIFF/VP8X/ANIM/ANMF) container, entirely client-side. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-26

Overview

Introduction

This tool converts an Animated PNG (APNG) into a real animated WebP file, entirely in your browser, giving you a smaller, broadly-supported modern animation format.

Every frame is decoded, re-encoded with your browser's native WebP encoder, and assembled into a valid animated WebP container locally; nothing you upload ever leaves your device.

What Is APNG to Webp Converter?

A client-side APNG-to-WebP converter that decodes an APNG's acTL/fcTL/fdAT chunk structure into individual RGBA frames, encodes each frame as a standalone WebP image using the browser's built-in canvas.toBlob('image/webp'), then hand-builds the animated WebP RIFF/VP8X/ANIM/ANMF container around those already-compressed frame payloads.

It intentionally splits the work this way: real image compression is left to the browser's own tested WebP encoder, while this tool supplies the animation-container logic the browser's canvas API doesn't expose directly.

How APNG to Webp Converter Works

Each decoded APNG frame is painted onto an off-screen canvas and exported via canvas.toBlob('image/webp'); the tool checks the resulting blob's actual MIME type to confirm the browser really produced WebP output rather than silently falling back to another format.

Those per-frame WebP payloads, along with each frame's dimensions and delay, are then packed into a single animated WebP file's ANIM header and one ANMF chunk per frame, per the WebP container specification.

When To Use APNG to Webp Converter

Use it when you want a smaller animated file than APNG typically produces, or need WebP specifically for a platform, CMS, or image pipeline that prefers it.

It's also useful for modernizing an existing APNG animation asset into today's more broadly-optimized animated image format.

Features

Advantages

  • Runs entirely client-side; the uploaded APNG is never sent to a server.
  • Reuses the browser's own real, well-tested WebP encoder for actual image compression rather than a hand-rolled approximation.
  • Produces a genuine, valid animated WebP container with correct frame offsets, dimensions, and timing.

Limitations

  • WebP encoding quality and even availability depend entirely on the browser running the tool's canvas.toBlob('image/webp') implementation; a browser lacking WebP encoding support will cause the conversion to fail with an explicit error rather than a silent bad result.
  • This tool writes the RIFF/VP8X/ANIM/ANMF animation container by hand but does not implement VP8/VP8L compression itself — all actual pixel compression is delegated to the browser.

Examples

4-frame loading spinner

Input

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

Output

A 64x64 animated WebP, 4 frames, 200ms delay each

Frame count, dimensions, and timing carry over directly; only the underlying image compression codec changes.

Browser without WebP encoding support

Input

An APNG uploaded in a very old browser

Output

Error: a message explaining the browser can't encode WebP images

The tool checks the actual blob MIME type from canvas.toBlob rather than assuming success, so this failure is caught and reported honestly.

Best Practices & Notes

Best Practices

  • Use a modern, up-to-date browser, since WebP encoding support and quality both depend on the browser's own implementation.
  • Compare the resulting file size against the original APNG — WebP is usually, but not always, smaller.

Developer Notes

The animated WebP container assembly (RIFF/VP8X/ANIM/ANMF chunk packing) is a pure, synchronous function operating on already-encoded per-frame WebP byte arrays, fully unit-testable under Node; only the surrounding component touches an actual <canvas> and canvas.toBlob to perform the real per-frame WebP compression, since that API only exists in the browser.

APNG to Webp Converter Use Cases

  • Converting an animated app icon or badge to WebP for a modern image pipeline
  • Reducing an animation's file size versus its original APNG encoding
  • Preparing an animated asset for a platform or CDN that prefers WebP over APNG

Common Mistakes

  • Assuming WebP conversion always succeeds — some older or unusual browser environments genuinely can't encode WebP, and this tool reports that honestly instead of faking output.
  • Expecting bit-identical pixels after conversion — the browser's WebP encoder may apply its own lossy or lossless compression choices.

Tips

  • If the conversion fails, try a different, more modern browser before assuming the source APNG is invalid.
  • Preview the animated WebP output before downloading to confirm frame order and timing look correct.

References

Frequently Asked Questions