Free GIF Compressor
Make an animated GIF smaller: fit it under a size limit such as Discord's 256 KB emoji or 512 KB sticker, or choose colours, width and frames yourself. Runs in your browser; the GIF is not uploaded.
Drop a file here, or click to browse
GIF, HEIC, HEIF · processed on your device
or press Ctrl+V to paste from your clipboard
Your files never leave your device. All processing happens locally in your browser.
How It Works
The page reads your GIF's size and frames, then uses ffmpeg (compiled to WebAssembly, running in your browser) in two passes: it builds a colour palette from the GIF's own colours, then rewrites each frame with that palette, storing only the part of each frame that changed. To fit a size limit it tries fewer colours first, then every other frame, then a smaller width, until the file fits.
- 1Open the GIFDrop a GIF or press "Browse files". Its size, frame count and length are shown.
- 2Choose a goal"Fit under a size" with a limit such as Discord emoji (256 KB) or sticker (512 KB), or "Choose settings" for colours, width and frames.
- 3CompressPress "Compress GIF". The first run downloads the video engine once; then it works offline.
- 4Compare and downloadBoth GIFs play side by side with their sizes. Download the smaller one.
Your GIF is compressed in this browser and never uploaded.
Guide
Worked example
Take a GIF that is 4 MB, 480 by 270 pixels, with 60 frames at 8 hundredths of a second each. Once you choose it, the page shows "480×270 · 60 frames · 4.8 s". Leave the Goal on "Fit under a size" and the "Size limit" on its default, "Discord emoji (256 KB)", which is 262,144 bytes, and press "Compress GIF". The file is more than four times the target, so the first pass already starts at a smaller width: 480 × √(2 × 262,144 ÷ 4,194,304) = about 170 pixels, at 256 colours with all frames. If that pass comes out at 300,000 bytes, the next one keeps 170 pixels and drops to 128 colours; at 500,000 bytes it keeps every other frame instead; at 700,000 bytes it shrinks the width to 98 pixels. It stops as soon as the file fits, after at most 8 passes. A result of 250,000 bytes would show "94% smaller: 244.1 KB" and download as "name_compressed.gif".
Which settings to use, and the limits
- Start with "Fit under a size". The Goal "Fit under a size" is the default. Pick a "Size limit" from "Slack emoji (128 KB)", "Discord emoji (256 KB)", "Discord sticker (512 KB)", "1 MB", "5 MB" or "10 MB (Discord upload)", and the tool keeps making the GIF smaller until it fits. The labels are only presets, and sizes are counted as 1 KB = 1,024 bytes, so check the current limit of the site you upload to. If the GIF is already under the size you pick, the page says so, and compressing can still make it smaller.
- Know what it changes, and in what order. In "Fit under a size" the tool tries fewer colours (256, then 128, 64, 32), then keeping every other frame, then a smaller width, and each pass starts from the last one. Which step comes next depends on how far over the target the last result was: fewer colours when it is within 1.6 times the target, every other frame (only for GIFs with 8 or more frames) within 2.2 times, otherwise a narrower width. Width never goes below 48 pixels, and it stops after 8 passes. The page describes it as "Fewer colours first, then every other frame, then a smaller width, until it fits."
- Use "Choose settings" for exact control. This mode runs one pass with exactly what you pick. "Colours" offers 256, 128, 64 and 32 (128 is selected at first). "Width" offers "Original", shown with your GIF's own width such as "Original (600px)", plus whichever of 480, 320, 240 and 128 px are narrower than your GIF. "Frames" offers "Keep all frames", "Keep 1 frame in 2 (same speed)" and "Keep 1 frame in 3 (same speed)". Dropping frames makes motion less smooth.
- Match the dithering to the picture. "Dithering" has three choices: "Pattern (smallest files)", which is the default, "Diffusion (smoothest gradients)" and "None (flat colours, cartoons)". Use Diffusion for photos and gradients, None for flat-colour artwork, and keep Pattern when file size matters most. It applies in both Goals, and changing any setting clears the previous result.
- The tool never gives you a bigger file. If the re-encoded GIF is not smaller than your original, the tool keeps the original bytes and says "This GIF is already well optimised, so the original is kept. Try fewer colours or a smaller width." The downloaded file is then your original under the new name. This tends to happen with GIFs that were already optimised. When a smaller file is made, the loop setting of your original is kept, including a GIF that plays once.
- Check how a GIF is counted, and consider MP4. The tool reads the GIF's header and frame list without decoding pixels and shows the picture size, frame count and duration next to the file size. When it works out the duration, a frame delay of 0 or 1 hundredth of a second is counted as 0.1 second, the way browsers play it. The page also says "Much smaller still: most chat apps and sites play an MP4 like a GIF. Use GIF to MP4 for that." The tool takes one GIF at a time. The first use downloads the video engine, about 31 MB, which is kept in your browser afterwards, and your GIF is processed in the browser and not uploaded.
Common problems and how to fix them
- It says "This file is not a GIF. Choose an animated .gif file."
- The tool checks the first bytes of the file, not just its name. A PNG, WebP or MP4 renamed to .gif is usually refused as soon as you drop it, with a message such as "photo.gif is a PNG file, which this tool can't open." The "not a GIF" message appears for a file that does not start with GIF87a or GIF89a and whose type could not be identified, one too short to hold a GIF header, or one with no frames or a zero width or height, such as a damaged file. Export the animation again as a real GIF and choose it.
- It says "Could not reach the size limit without making the GIF too small. Try a shorter GIF or a bigger limit."
- The tool ran out of steps before the file fit: it made 8 passes, or the width reached 48 pixels. You can still download its last attempt. Choose a larger "Size limit", or shorten the animation in another tool first, since this one cannot cut frames from the start or end. The page also notes that an MP4 is much smaller still.
- It says "This GIF is already well optimised, so the original is kept. Try fewer colours or a smaller width."
- The re-encoded GIF came out the same size or bigger, so the tool kept your original instead of handing back a larger file. In "Choose settings" pick 64 or 32 colours or a narrower width. In "Fit under a size" pick a "Size limit" below your file's size, because a GIF that already fits gets only one pass. The page also notes that an MP4 is much smaller still.
- It says "Failed to load the encoder. Check your internet connection and try again."
- The video engine, about 31 MB, could not be downloaded. The page starts that download as soon as you choose the GIF, and the button reads "Loading the engine… (tap to cancel)" while it waits. Check your connection and press "Compress GIF" again. Once the engine has downloaded it is kept in your browser.
- It says "The browser ran out of memory processing this file — it is too large for this device. Try a shorter clip, a smaller file, or a desktop computer."
- Unlike the audio and video tools, this one does not check the file size when you choose the file, and the whole GIF is held in the browser's memory while it is processed. A GIF with a very large number of frames or a large picture can run it out of memory. Try a desktop computer, or shorten the GIF elsewhere first.
How it compares
"Fit under a size" saves effort: it picks the settings for you and stops at the first result that fits. "Choose settings" gives one predictable pass but can miss your target. Either way this tool only reduces colours, frames and width of an existing GIF. It does not crop, trim, speed up, reverse or edit frames, and it works on one GIF at a time. Its encoder is ffmpeg's palette method, with no lossy GIF encoding step, so a desktop optimiser that has one may get a smaller file from the same GIF. A bigger saving comes from changing format: the page itself points to MP4, which it says most chat apps and sites play like a GIF. In exchange, nothing is uploaded or installed.
Related Tools
PDF Compressor
Compress PDF files to reduce their size. Choose a quality level — higher compression means smaller files but lower image fidelity.
Video Compressor
Compress video files to reduce their size. Choose quality, resolution, and output format. All processing is local.
Image Compressor
Compress JPG, PNG, WebP, and AVIF images. See before/after comparison.