User Rating 0.0
Total Usage 0 times

Drop an animated GIF here or click to browse

Max 50 MB · GIF87a / GIF89a

Is this tool helpful?

Your feedback helps us improve.

About

Animated GIF files use a compression scheme from 1989. A typical animation stored as GIF occupies 1.7 MB while the same content encoded as WebM (VP9) compresses to roughly 94 KB - a reduction factor exceeding 18×. GIF decodes every frame into an uncompressed bitmap before display, producing the characteristic "slow motion" loading artifact on constrained connections. WebM streams progressively: the first bytes paint a visible frame. This tool parses the GIF89a binary format entirely in your browser, decompresses LZW image data, coalesces partial-frame disposal chains onto a canvas, then re-encodes the sequence via the MediaRecorder API as a loopable WebM file. No server upload occurs. Note: output quality depends on browser VP8/VP9 encoder fidelity, which varies across engines. Chrome and Edge produce the best results. Firefox supports VP8 but may yield slightly larger files. Safari has limited WebM encoding support.

gif to webm animated gif converter webm encoder image converter gif optimization video conversion

Formulas

GIF frame timing is stored in the Graphic Control Extension as a delay value d in hundredths of a second. The effective framerate for the WebM output is computed per-frame:

FPSeffective = 1d × 0.01

Where d = 0 is treated as d = 10 (100 ms) per the GIF89a specification, since many decoders interpret zero-delay as a "fast as reasonable" directive and typically default to 10 fps.

The compression ratio achieved:

R = SGIFSWebM

Where SGIF is the source file size in bytes and SWebM is the output size. Typical values range from 5× to 20× depending on content complexity and color distribution.

LZW decompression uses a variable-width code table starting at minCodeSize + 1 bits, expanding up to 12 bits. The clear code is 2minCodeSize and the end-of-information code is 2minCodeSize + 1.

Reference Data

FormatCodecYearMax ColorsAlphaProgressive LoadTypical Size (10s anim)Browser Support
GIFLZW19892561-bit onlyNo1.5 - 5 MBUniversal
APNGDeflate200416.7M (32-bit RGBA)8-bitNo0.8 - 3 MBAll modern
WebM (VP8)VP8201016.7M (YUV420)NoYes80 - 300 KBChrome, Firefox, Edge
WebM (VP9)VP9201316.7M (YUV420/444)Yes (Profile 1)Yes50 - 200 KBChrome, Firefox, Edge
MP4 (H.264)AVC200316.7M (YUV420)NoYes (moov atom)100 - 400 KBUniversal
MP4 (H.265)HEVC201316.7MNoYes40 - 150 KBSafari, partial Chrome
AV1AV1201816.7M (HDR capable)YesYes30 - 120 KBChrome 70+, Firefox 67+
WebP (anim)VP8201116.7M (RGBA)8-bitNo200 - 800 KBAll modern
FLIFMANIAC201516.7M16-bitYes (interlaced)100 - 500 KBNone native
JXL (anim)JPEG XL202116.7M (HDR)YesYes60 - 250 KBNone (flag removed)
MNGDeflate200116.7M8-bitNo1 - 4 MBNone mainstream
MPEG-DASH (frag)Various201216.7MCodec-dep.Yes (adaptive)VariableVia JS players

Frequently Asked Questions

Safari's MediaRecorder API does not support the video/webm MIME type. Apple's encoder only supports video/mp4 with H.264. On Safari, this tool will attempt fallback encoding but may not produce output. For reliable WebM conversion, use Chrome (version 49+), Firefox (version 36+), or Edge (version 79+). These browsers ship with a built-in VP8/VP9 encoder accessible through the MediaRecorder API.
GIF89a defines four disposal methods in the Graphic Control Extension: 0 (unspecified), 1 (do not dispose - leave frame in place), 2 (restore to background color), and 3 (restore to previous frame state). Many optimized GIFs use method 1 with partial frames and 1-bit transparency to reduce file size by only encoding pixels that changed between frames. This converter implements full frame coalescing: it maintains a compositing canvas and applies each frame according to its disposal method, producing complete frames for the video encoder. No external tools like ImageMagick are needed.
The quality parameter maps directly to the videoBitsPerSecond option of the MediaRecorder API. At quality level 1.0, the encoder targets approximately 2.5 Mbps. At 0.1, it targets roughly 250 kbps. The relationship is linear. For most animated GIF conversions (typically 256 colors, limited motion), a quality setting between 0.4 and 0.6 produces visually indistinguishable output at roughly 60% of maximum file size. Below 0.2, you may notice blocking artifacts in gradient regions.
Browser-based VP8/VP9 encoders operate in real-time mode without access to multi-pass encoding, look-ahead buffers, or the advanced rate-control algorithms available in libvpx. The ffmpeg tool with --enable-libvpx can perform two-pass encoding and constrained quality (CQ) mode, which analyzes the entire video before encoding. Browser output is typically 1.5x to 3x larger than an equivalent ffmpeg two-pass encode. For production assets where every kilobyte matters, use this tool for quick previews and prototyping, then run a server-side encoder for final output.
Yes. The GIF format supports both a Global Color Table (up to 256 entries) and per-frame Local Color Tables (also up to 256 entries each). An optimized GIF can use different 256-color palettes per frame, effectively displaying thousands of unique colors across the animation. This parser reads both table types and resolves each frame's pixel colors against its applicable table. The resulting canvas frames capture full 24-bit RGB, which the VP9 encoder then compresses in YUV420 color space.
The tool enforces a 50 MB input limit to prevent browser tab crashes from memory exhaustion. Each decoded frame occupies width × height × 4 bytes in RGBA format. A 500×500 pixel GIF with 300 frames requires approximately 300 MB of uncompressed frame data in memory. For very large or long animations, monitor your browser's memory usage. Chrome's V8 engine typically handles up to 1-2 GB of heap before throttling. If the parser encounters memory pressure, it will report an error rather than silently failing.