GIF Compressor
Shrink a GIF by cutting colors, removing frames or reducing the size. You see the size before and after, and you never get a bigger file back.
https://flxcode.com/gif-compressor/
or drop one here
One animated GIF, up to 100 MB.
Your GIF
More changes
New GIF
No ads. No account. Nothing you type or record is uploaded. We count page events with a daily code. Check it.
Problem or idea? Email us
Quick start
- Choose your GIF. The tool reads every frame.
- Start with 128 colors. Lower it to 64 or 32 if the file is still too big.
- Remove every 2nd or 3rd frame, or open Size and pick 75% or 50%.
- Press Compress GIF, compare the sizes and download.
Where a GIF's size comes from
A GIF is big for three reasons: it has many frames, each frame has many pixels, and each pixel is one of up to 256 colors. Every setting on this page attacks one of the three.
Fewer colors help a lot on flat art, and less on photos. Removing frames cuts the size in proportion, with choppier movement. A smaller size helps most of all, because pixels drop with the square of the width.
What each setting saves
A 160 x 120 test animation with 20 frames, run through this tool's own writer with each setting. Your GIF will differ, but the order is the same.
| Setting | File size | Smaller than the first row by |
|---|---|---|
| 256 colors, all 20 frames, 160 x 120 | 14 KB | 0% |
| 128 colors | 12 KB | 17% |
| 64 colors | 10 KB | 27% |
| 32 colors | 9.1 KB | 36% |
| 16 colors | 8.3 KB | 41% |
| 32 colors, every 2nd frame removed (10 frames) | 5.7 KB | 60% |
| 32 colors, 80 x 60 px | 4.7 KB | 67% |
| 32 colors, half the frames and half the size | 3.0 KB | 79% |
How it works
The tool reads all frames, applies your changes and writes the GIF again with one shared palette. Where a pixel is the same as in the frame before, it writes a see-through pixel instead, so long runs of identical pixels compress well.
If the new file would be as big as the original or bigger, the tool gives your original back and says so. A GIF that was already tight cannot be made smaller by re-writing it.
Numbers this uses
- Colors: 256, 128, 64, 32, 16 or 8. Default 128 with dithering off, which is the smaller choice.
- Remove every 2nd to 5th frame. The removed frame's time is added to the one before it, so the length stays.
- Size by pixels or 75%, 50%, 25%. Frames are averaged when shrinking, with see-through parts kept.
- Limit: frames x width x height x 4 bytes up to 800 MB, and files up to 100 MB.
Limits
- This is not the lossy mode of tools like gifsicle: it changes colors, frames and size, and nothing else.
- Frames that were optimized with partial updates are put together first, so a file already made by an optimizer can come out bigger. Then you get your original back.
- Transparency is kept as on or off. Partial transparency does not exist in GIF.
Privacy
Nothing you choose is uploaded or stored. The code that reads and writes GIFs comes from this site and runs in your browser. We count events without cookies, such as "GIF saved" (details).
FAQ
How do I reduce the size of a GIF?
Lower the colors to 64 or 32, remove every 2nd frame and reduce the width. Press Compress GIF and read the before and after sizes. Repeat with stronger settings if you need more.
How much smaller can a GIF get?
It depends on the content. Flat graphics can lose more than half with 32 colors. Photos and video clips usually need a smaller size or fewer frames as well.
Will it look worse?
Fewer colors show as banding, and dropped frames as choppier movement. Look at the preview before you download. If it looks wrong, go back one step.
Why did I get my original back?
The tool never returns a bigger file. If your settings cannot make it smaller, it hands back the file you chose. Try fewer colors, dropping frames or a smaller size.
Does it keep the animation speed?
Yes. Frames you remove give their time to the frame before, and the repeat setting stays the same unless you change it under More changes.
What is a good size for email or chat?
Many places cap uploads at a few megabytes, and the limit differs from one to the next. Check the limit of the place you post to, then compress until the size fits.
Does transparency survive?
Yes. A GIF can have fully see-through pixels, and those stay see-through after compressing.
Is my file uploaded?
No. The file is opened, changed and saved by your browser on this device. It is not sent, stored or put in the address bar. To check, load the page, turn on airplane mode and make a GIF.
More from FLXCode
GIF ResizerNew
Resize an animated GIF to a new width and height, keeping timing and repeat. Runs in your browser, no upload.
GIF Speed ChangerNew
Speed up or slow down an animated GIF from 0.25x to 4x. Delays never go under 20 ms. Runs in your browser, no upload.
Video to GIFNew
Turn part of a video into an animated GIF. Trim, pick the frame rate and width. Runs in your browser, no upload.
GIF MakerNew
Make an animated GIF from pictures. Reorder frames, set delays, repeat and size. Runs in your browser, no upload.