Compress a GIF
Drop a GIF and it is written again to make it smaller, with the size before and after under the button. Lower the quality, resize it, or keep fewer frames, and the GIF and its size follow each change.
How to use it#
- Drop a GIF onto the box above, or click it to choose one.
- Pick a quality, a size, and how many frames to keep. Each change compresses the GIF again.
- Watch the preview and the size under the button, then download the GIF.
Why a GIF is so large, and what makes it smaller#
A GIF has no video codec. Each frame is a picture of up to 256 colours, packed with LZW, a lossless method, as the GIF89a specification sets out, so a ten-second clip at 15 frames a second is 150 pictures. That is why a GIF of a few seconds can weigh more than the MP4 it was made from.
This page writes every frame as the change from the one before: a pixel that looks the same as what is already on screen is left see-through, and a run of those packs to almost nothing. "Quality" decides how far a pixel may drift before it counts as changed, so Medium and Low skip the flicker of noise that a GIF otherwise pays for on every frame. That makes it lossy compression, and Low also draws each frame in 128 colours rather than 256. A GIF with see-through pixels is written a whole frame at a time, so for it quality changes only the colours, and it shrinks less.
Which setting saves the most#
Size usually saves the most. The Size list offers 75%, 50%, and 25%, each with its width and height in pixels, so resizing a GIF to fit a chat or a page is the same step. Half the width is a quarter of the pixels, so a GIF at 50% often comes out well under half its size, and still looks sharp in a chat or on a phone, where it is shown small anyway. "Frames kept" at Half drops every second frame and shows each one left for twice as long, which halves the frame rate: the GIF runs for the same time but moves less smoothly. "A third" keeps one frame in three.
Quality saves most on a GIF made from a video, where noise changes pixels on every frame. A cartoon, a screen recording, or a GIF with large flat areas is already small for its length, and lowering the quality gains less there. Try a setting and look at the size under the button: it is the size of the file you will download, measured from the file itself.
When the GIF comes out no smaller#
A GIF that has already been through an optimiser can come out larger at High quality, because its colours were chosen frame by frame with more care than a quick pass can match. When that happens the page says so and does not offer the bigger file, so you never download a GIF larger than the one you have.
For a short clip to share, a GIF is often the wrong format: an MP4 of the same clip is a fraction of the size and plays everywhere a GIF does, apart from a few forums and email. The GIF to MP4 converter makes one. To make a GIF from a video at a size of your choosing in the first place, use MP4 to GIF.
Frequently asked questions#
What do the quality levels change?
#
High rewrites a pixel when any of its red, green, or blue values moves by more than 8 of 255, which keeps the GIF as it looks. Medium waits for a move of 16 and Low for 24, so the faint shimmer of noise in a video stays still, and Low also uses 128 colours a frame rather than 256. Movement is kept at every level; what can go at Medium and Low is a slow, faint change, such as a fade, which may step rather than glide. To compress a GIF without losing quality, keep High and lower the size or the frames instead.
Does compressing keep transparency?
#
Yes. A GIF with a see-through background keeps it, at every quality and size. A GIF pixel is either fully shown or fully clear, so a soft edge drawn smaller is cut at half opacity, as it was in the original.
Will the GIF play at the same speed?
#
Yes. When frames are dropped, each frame kept is shown for its own time and the time of the frames dropped after it, so the GIF runs for the same length. It loops the way the original did: for ever, a set number of times, or once.
How do I get a GIF under a size limit for Discord, Slack, or email?
#
Lower the size first, since it saves the most, then the quality, then the frames, and watch the size under the button after each change. It is the exact size of the file you will download, so check it against the limit the app or the email gives, which is often around 8 to 25 MB.
Which GIFs can it compress?
#
Any GIF, animated or still, in either version of the format (GIF87a or GIF89a). The file is checked by its contents, not its name, so a PNG renamed .gif is turned away. A GIF larger than about 16.7 million pixels a frame, such as 5000 × 4000, is more than a phone browser can draw, so it is refused.
Is my GIF uploaded?
#
No. The GIF is taken apart and written again in this browser tab, so it is never sent anywhere.