How to use GIF compressor
- Choose an animated GIF, or try the sample.
- Pick the number of colours, the width, the frame rate and how lossy the compression may be.
- Select Compress GIF. The first time, the video engine (FFmpeg) downloads once and your browser keeps it.
- Compare the before and after sizes, check the preview and download the smaller GIF.
Four ways to a smaller GIF
GIF is an old format: every frame is a picture with at most 256 colours, compressed with a simple scheme that struggles with noise and fine detail. That leaves four levers, and this tool gives you each of them. Width matters most, since halving the width leaves about a quarter of the pixels. Frame rate comes next: the tool reads the GIF's own frame timing and offers only lower rates, such as 12 or 10 frames per second, because dropping frames is what saves bytes.
Colours can go from 256 down to 16. FFmpeg builds a fresh palette from the frames themselves, so 64 or 128 well-chosen colours often look nearly the same as the original. Lossy compression changes how those colours are mixed: Off uses smooth error-diffusion dithering, Low and Medium use an ordered pattern that often compresses better, and High drops dithering and smooths noise between frames, so more pixels can stay unchanged from one frame to the next. How much each setting saves depends on the GIF, so compare the sizes it reports.
Before and after
When it finishes, the tool shows the original and new sizes, the share saved, and the new GIF's dimensions, frame count and frame rate, read from the file itself. If a GIF is already tightly optimised and the result isn't smaller, it says so and suggests what to try. The compressed GIF keeps the original's loop setting and drops comments and other metadata the animation doesn't need.
How it runs
The work is done by FFmpeg compiled to WebAssembly, WeaveAI's LGPL build and the same engine as the video to GIF tool, using its palettegen and paletteuse filters. It downloads once, about 6 MB, from WeaveAI's own engine server, and your browser keeps it. gifsicle, the usual GIF optimiser, is GPL-licensed, so it isn't used. Your GIF is read in place on your device and never uploaded.
A good order to try: start with the defaults, which keep every frame at full width with 128 colours and medium lossy compression. If the file is still too big for where it's going, such as a chat app, a README or an email, halve the width first, then lower the frame rate, and only then cut the colours further. The preview shows the result before you download it.
Questions
- Is my GIF uploaded?
- No. FFmpeg runs inside your browser and reads the GIF on your device. The only download is FFmpeg itself, from WeaveAI's own engine server.
- Which setting saves the most?
- Width and frame rate usually save the most: half the width is about a quarter of the pixels, and half the frames is about half the data. Fewer colours and stronger lossy settings help next, at some cost in smoothness.
- Does it use gifsicle?
- No. gifsicle is GPL-licensed, so WeaveAI uses FFmpeg's own LGPL GIF encoder with a palette built for each GIF. Lossy here means a coarser dither and, at High, noise smoothing, rather than gifsicle's --lossy option.
- Will it still loop?
- Yes. The compressed GIF keeps the original's loop setting: one that loops forever still does, and one that plays once still plays once.