User Rating 0.0
Total Usage 0 times

Drop APNG file here or browse

Supports .apng / .png up to 50 MB

Is this tool helpful?

Your feedback helps us improve.

About

APNG (Animated Portable Network Graphics) stores lossless animation data inside a PNG container using acTL, fcTL, and fdAT chunks that most image editors cannot process directly. Converting to WebP reduces file size by 25 - 35% at equivalent perceptual quality because WebP uses VP8 lossy compression with a configurable q factor from 0 to 1. This tool parses the raw APNG binary structure in your browser, reconstructs each frame respecting dispose_op and blend_op flags per the APNG 1.0 specification, then re-encodes via the Canvas API. No server upload occurs. File size limit is 50MB. Note: browsers cannot natively encode animated WebP from JavaScript, so multi-frame APNGs are exported as individual WebP frames or as a single composite frame. For lossless round-tripping, set quality to 1.0.

apng to webp animated png converter webp converter image converter apng extractor frame extractor png to webp

Formulas

WebP lossy compression targets a quality factor that maps to a quantization parameter. The relationship between input quality and output file size follows an approximately inverse-logarithmic curve:

Sout Sraw k (1 q)

where Sout = output file size in bytes, Sraw = uncompressed pixel data size (W × H × 4 bytes), k = compression efficiency constant (typically 0.05 - 0.15 for photographic content), and q = quality factor in the range [0, 1].

APNG frame timing uses a rational delay:

tdelay = delay_numdelay_den seconds

where delay_num and delay_den are unsigned 16-bit integers read from each fcTL chunk. If delay_den = 0, the specification mandates treating it as 100, yielding a default frame rate of 100fps.

Reference Data

PropertyAPNGWebP
CompressionLossless (Deflate)Lossy (VP8) / Lossless (VP8L)
Color DepthUp to 32bit RGBAUp to 32bit RGBA
Animation SupportYes (acTL/fcTL chunks)Yes (ANMF chunks)
Browser SupportAll modern browsersAll modern browsers
TransparencyFull alpha channelFull alpha channel
Typical File Size (256×256, 10 frames)~150KB~95KB
Max Dimensions231 1 px16383 × 16383 px
Lossy Quality RangeN/A (lossless only)0 - 100
MIME Typeimage/apng / image/pngimage/webp
File Signature (Magic Bytes)89 50 4E 47 0D 0A 1A 0A52 49 46 46 ... 57 45 42 50
SpecificationAPNG 1.0 (Mozilla)WebP Container Spec (Google)
Metadata SupporttEXt, iTXt, zTXt chunksEXIF, XMP via RIFF
Progressive DecodingYes (interlaced PNG)No
Typical Use CaseAnimated stickers, UI spritesWeb images, thumbnails
Fallback BehaviorShows first frame as static PNGNo fallback (requires WebP support)

Frequently Asked Questions

Browser Canvas APIs expose toBlob() and toDataURL() for static image encoding only. The WebP container specification supports animation via ANMF chunks, but no browser JavaScript API can encode animated WebP natively. Producing animated WebP requires a WASM-compiled encoder like libwebp, which exceeds the scope of a zero-dependency client-side tool. As a workaround, this tool exports all frames as individual WebP files.
The APNG specification defines three disposal operations: NONE (keep frame buffer), BACKGROUND (clear region to transparent black), and PREVIOUS (revert to buffer state before the frame was drawn). This tool maintains a snapshot stack. Before rendering a frame with dispose_op = PREVIOUS, the current canvas state is saved via getImageData(). After compositing, the saved state is restored. This ensures subsequent frames composite correctly.
No. WebP uses VP8 lossy encoding where quality maps to quantization parameters non-linearly. Quality values between 0.75 and 1.0 produce diminishing size reductions. A quality of 0.80 typically yields 60-70% size reduction compared to lossless, while dropping from 0.80 to 0.50 only saves an additional 15-20%. For most use cases, a quality of 0.80 offers the best size-to-fidelity tradeoff.
Before encoding, the tool checks if either dimension exceeds 16383 pixels. If so, it proportionally downscales the frame to fit within the WebP maximum of 16383 × 16383 pixels while preserving aspect ratio. A toast notification informs the user that downscaling was applied.
Yes. If the parser detects no acTL chunk (animation control), the file is treated as a single-frame PNG. The lone IDAT data is decoded, rendered to canvas, and encoded as a static WebP. This makes the tool usable as a general PNG-to-WebP converter as well.
The input limit is 50 MB. The APNG binary is loaded into an ArrayBuffer and parsed in a Web Worker to avoid blocking the main thread. Each reconstructed frame PNG blob and its corresponding object URL are revoked after use. Canvas contexts are explicitly cleared between frames. For a 100-frame APNG at 1024 × 1024 pixels, peak memory usage is approximately 100 × 4 MB = 400 MB of raw pixel data, so large files may cause pressure on devices with limited RAM.