1. Home
  2. Images
  3. GIF Converter

GIF Converter

Convert GIF to MP4 or APNG, and WebP or APNG back to GIF.

Runs in your browser · No upload

How to use

  1. Drop a GIF, APNG or animated WebP, or click to choose one. One file, up to 50 MB. The format is detected from the file contents, not the extension.
  2. You see the size, frame count, duration, repeat count and a preview of the original.
  3. Pick the format to save as. A GIF can become MP4 or APNG, an APNG can become MP4 or GIF, and an animated WebP can become MP4, APNG or GIF.
  4. Set the options for that format and press Convert. Check the file size and download it.

Format comparison

Format Colors Transparency File size Notes
GIF 256 On or off Larger Opens everywhere
MP4 (H.264) Full color None Smaller Sharp and light. No repeat setting, so turn on looping in the player
APNG Full color 8-bit alpha Can be larger than GIF PNG compatible, transparency kept

MP4 often beats GIF in messengers and social apps. A GIF compresses a 256-color picture for every frame, while H.264 compresses only the changes between frames, so the gap grows with busy footage. Many services also autoplay and loop an uploaded video. MP4 has no transparency though, so transparent areas are filled with the background color you pick.

GIF to MP4

The browser’s WebCodecs VideoEncoder encodes H.264 and the result is wrapped into an MP4 file. Before converting, isConfigSupported checks whether this browser can encode H.264 at that size, and if not the MP4 button is blocked with the reason. Chromium-based browsers usually can, but an H.264 encoder may be missing depending on the system.

  • H.264 needs an even width and height, so odd sizes lose 1 px. 101×51 px is saved as 100×50 px.
  • Frame times are the running total of the delays. Delays of 100, 50 and 20 ms start at 0, 100,000 and 150,000 µs.
  • The baseline profile is tried first at a level that fits the size: 640×360 px uses avc1.42001e, 1280×720 px avc1.42001f and 1920×1080 px avc1.420028. If that fails, main and high profiles are tried in turn.
  • Quality sets the bits per pixel per frame: Low 0.06, Medium 0.12, High 0.24. The bitrate is width × height × average fps × that value, limited to 100,000–20,000,000 bps. At 640×360 px and 10 fps that is 138,240 bps for Low, 276,480 bps for Medium and 552,960 bps for High. At 480×270 px and 10 fps Low would be 77,760 bps, but the floor lifts it to 100,000 bps.

GIF to APNG

The APNG encoder is written from scratch. After the PNG signature and IHDR it writes acTL (frame count and play count), then for every frame an fcTL (size, position, delay) and the image data. The first frame is IDAT and the rest are fdAT, and fcTL and fdAT chunks carry sequence numbers that count up from 0 in file order. Every chunk has a CRC32 and the data is zlib-compressed. Delays are written as numerator = ms over 1000, and each frame holds the full picture. The GIF repeat value becomes a play count: forever is 0, once is 1 and 2 more times is 3. With no 256-color limit, colors stay intact and transparency is kept. The file is saved as .png; places that do not support APNG may show only the first frame.

WebP and APNG to GIF

Animated WebP and APNG frames are read with the browser’s ImageDecoder. Where ImageDecoder is missing, APNG is read with a decoder written for this tool: it splits the file into one PNG per frame and composites them following the clear, restore and blend rules. Animated WebP cannot be read without ImageDecoder, and a message says so. The frames are reduced to 256 colors or fewer to make the GIF, and you can choose colors, dithering and a palette per frame. A delay of 0 or under 20 ms becomes 100 ms, as browsers do.

Conversions that are not supported

GIF to animated WebP and GIF to AVIF are not supported. Browsers have no encoder for these animated images, and forcing it would give no guarantee of quality or compatibility. Use MP4 or APNG instead.

Limits are 1,000 frames, a 2,000 × 2,000 px canvas and 200 million for width × height × frames. MP4 output uses mediabunny, licensed under MPL-2.0.

To refine a GIF use GIF Editor, to build one use GIF Maker, to save frames as images use GIF Frame Extractor, and for still images use Image Converter.

Your file is processed only in your browser and is never sent to a server.

Can't find the tool you need?

Tell us what you want to do. We build the most requested tools first.