About Resize, Crop and Shrink Animated GIFs
Shrink an animated GIF by giving it smaller dimensions, cropping it, keeping only every second or third frame, or giving each frame fewer colors, alone or together. Every frame is first rebuilt as a browser shows it, so frames that cover only part of the picture, see-through backgrounds and the timing of each frame come through as they were, and the loop count is kept.
The original and new sizes are shown side by side with the difference. If the new GIF is not smaller, the tool says so and offers the original first, so a file is never swapped for a larger one by accident. The GIF is read and written by this page’s own code, on your device.
How it works
- The GIF’s blocks are read first, without decoding anything, to check it against the limits: up to 100 million pixels across all frames.
- Each frame is decoded and drawn over what the frame before it left, with that frame’s disposal method applied, giving the whole picture a browser shows at that moment.
- The pictures are cropped and scaled down, each new pixel the average of the area it covers, and every Nth one is kept with the time of the dropped frames added to it.
- Colors stay exact when all the frames together use no more than the count you chose, see-through counting as one; otherwise colors are matched to the nearest ones in a palette that fits, shared or for each frame. See-through pixels stay see-through.
- The new GIF is written with the same loop count, and its size is set beside the original’s.
Questions
Will my GIF always get smaller?
Usually, but not always: a GIF that is already compact for what it shows can come out larger once its frames are rebuilt. The tool then says so in words and offers the original as the smaller file, keeping the new one available in case you need its size, crop, frames or colors.
Does the animation keep its timing?
Yes. Each frame keeps its delay, and when frames are dropped their time is added to the frame shown before them, so one play lasts as long. Delays under 20 ms, which browsers show for 100 ms, are written as 100 ms. The loop count is kept.
What happens to a transparent background?
It stays see-through. When the picture is scaled down, a new pixel is see-through if more than half of the area it covers was. The see-through color takes one place in the palette, so it counts toward the number of colors.
Why do the colors look slightly different?
Because they did not all fit: scaling the picture down blends neighbouring pixels into new colors, and the palette holds no more than the count you chose, 256 at most. With 256 colors and no scaling, colors stay exact when all the frames as shown use at most 256 colors between them, see-through counting as one. Past that, colors are matched to the nearest ones in a palette that fits, and some may change.
How large a GIF can it take?
Files up to 100 MB and about 16.7 megapixels a frame, with up to 5,000 frames read, 1,000 written and 100 million pixels across all frames (frames × width × height). The new GIF is at most 4,096 pixels a side. Larger GIFs are refused with a message before they are decoded.
What about a GIF with no end marker or one that is cut short?
A GIF missing its end marker plays in browsers, and it is read here the same way, with a note. In a GIF cut short, the part of the last frame that arrived is used and the note says which frame is incomplete. A file that is not a GIF is refused in words.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.