Guide · GIF optimization
How to Compress a GIF
Short answer
To compress a GIF, run it through a GIF compressor that combines lossy compression, an optimized color palette and frame-difference encoding. If it’s still too big, drop frames or resize it. On our 8 test GIFs, the default settings cut total size by 61% and kept every frame. A free browser tool does this in seconds, without uploading.
Quick steps
- Open the GIF Compressor and drop in your GIF.
- Keep Balanced, or pick Lossless if every pixel must stay identical.
- Need a hard limit? Type a target size (for example 2 MB) or click a preset.
- Play the before/after preview to check the animation.
- Download the GIF, or a ZIP if you compressed several.
Our test result: 8 GIFs (a screen recording, video clips, photo animations, a transparent spinner) went from 6.27 MB to 2.44 MB, 61% smaller, with frame count, timing, loop and transparency intact.
How to compress a GIF online (step by step)
The fastest way to compress a GIF is in the browser. GIF Compressor decodes every frame, keeps only the pixels that change, builds a better palette and re-encodes with a lossy LZW encoder in one pass. Your files stay on your device.
- Add your GIFs. Drag files or a folder onto the drop zone, click Select files, or paste with Ctrl/⌘+V.
- Let it compress. It starts automatically at Balanced (lossy 30, 256 colors). Each file shows its new size, frame count and saving.
- Check the animation. Click Preview to watch the original and the result play side by side.
- Adjust if needed. Pick Smallest, High quality or Lossless. Under Advanced options you can drop every Nth frame, change speed, resize, or set a target size.
- Download. One GIF downloads directly; several come as one ZIP.
Tip: If the GIF is already optimized, a good tool keeps the original rather than handing you a bigger file. Ours does.
Which method shrinks a GIF the most?
We ran one file through each method we could measure: video-clip.gif, 480×270, 60 frames, 3.32 MB.
| Method | Result | Change | Still a GIF? | What changed |
|---|---|---|---|---|
| GIF Compressor, Lossless | 3.28 MB | −1% | Yes | Nothing visible |
| GIF Compressor, Balanced | 1.26 MB | −62% | Yes | Slight noise, all 60 frames |
| GIF Compressor, Smallest | 753 KB | −78% | Yes | Visible noise, all 60 frames |
| GIF Compressor, drop every 2nd frame + 50% size | 218 KB | −94% | Yes | 30 frames, 240×135 |
| GIF Compressor, target 200 KB | 169 KB | −95% | Yes | 30 frames, 371×209 (chosen automatically) |
| ffmpeg palettegen/paletteuse, same size | 3.43 MB | +3% | Yes | New palette, Bayer dither |
| ffmpeg, half size + 128 colors | 667 KB | −80% | Yes | 240×135 |
| ffmpeg, convert to MP4 | 251 KB | −93% | No (video) | Not accepted where GIF is required |
Two lessons. Re-encoding alone can make a GIF bigger: ffmpeg’s palette pass grew this clip by 3% and a photo animation by 30% (555 KB → 721 KB), because dither noise breaks LZW’s patterns. Lossless helps only unoptimized GIFs: it saved 85% on a raw screen recording but 0–1% on video-derived ones.
How the tools compare on features:
| Tool | Lossy | Colors | Drop frames | Resize | Target size | Uploads file | Cost |
|---|---|---|---|---|---|---|---|
| GIF Compressor (browser) | Yes | Yes | Yes | Yes | Yes | No | Free |
| Photoshop Save for Web | Yes | Yes | Manual | Yes | “Optimize to File Size” | No | Paid |
| Mac Preview | No | No | Manual | Yes | No | No | Free |
| Canva GIF download | No | No | No | Via design size | No | Cloud | Free/Pro |
| ffmpeg / gifsicle | Yes (gifsicle) | Yes | Yes | Yes | No | No | Free |
How to reduce GIF file size: the 5 levers
Every method above pulls some mix of these levers. Use them in this order: the first ones cost the least quality.
1. Store only what changes between frames
GIF frames can be partial: a frame may hold just the rectangle that changed, with unchanged pixels marked transparent. Many exporters save every frame in full. Rebuilding the frames this way is lossless, and it’s why our screen recording went from 484 KB to 70 KB with identical pixels.
2. Use lossy LZW compression
GIF’s LZW compression is lossless, but an encoder may swap a pixel for a near-identical color when that extends a pattern. On video-like GIFs this is the biggest single lever: Balanced cut the clip above by 62% at the same size and frame count.
3. Reduce colors and turn off dithering
GIF allows up to 256 colors per frame. Fewer colors means shorter codes and longer runs. Dithering hides banding but adds noise that costs bytes, so leave it off unless gradients band.
4. Drop frames
To downsize a GIF without shortening it, remove every 2nd frame and add its delay to the previous frame, so the GIF plays for the same length of time. A 30 fps clip at 15 fps still looks smooth for most content.
5. Shrink the dimensions
Halving width and height leaves a quarter of the pixels in every frame. It’s the strongest lever but the most visible, so use it last, or when the GIF is shown smaller than it’s stored anyway.
How to compress a GIF in Photoshop
- Open the GIF. To remove frames, delete them in Window → Timeline, then raise the remaining frames’ delay.
- Image → Image Size to set a smaller width.
- File → Export → Save for Web (Legacy) (Alt+Shift+Ctrl+S / Option+Shift+Cmd+S), and choose GIF.
- Lower Colors (try 128, then 64), set Dither to No Dither, and raise Lossy. Adobe says 5–10, sometimes up to 50, usually won’t degrade the image.
- Watch the size readout in the lower-left corner, or use the panel menu’s Optimize to File Size. Then save.
How to compress a GIF on Mac
The quickest way is any browser tool: open the GIF compressor in Safari or Chrome and drop the file in. With built-in apps, Preview can only resize. Choose View → Thumbnails, press ⌘A to select every frame, then Tools → Adjust Size, enter a smaller width and save. Preview has no color or lossy settings, and users report the saved GIF can stop looping. Check it before you share it.
How to compress a GIF in Canva
Canva has no compression setting for GIFs. Its “Limit file size” option only works for PNG and JPG. To get a smaller GIF from Canva:
- Make the design smaller (a smaller custom size) and shorter, with fewer animated elements.
- Share → Download, choose GIF. Free accounts export up to 1280×720 and 1 minute.
- Compress the downloaded file in a GIF compressor to get the real savings.
How to compress GIFs with ffmpeg or gifsicle
Developers can script it. These are the ffmpeg commands we measured above (ffmpeg 7.1):
# Half size, 128-color palette, Bayer dither, only changed rectangles (−80% on our clip)
ffmpeg -i in.gif -vf "scale=iw/2:-1:flags=lanczos,split[a][b];[a]palettegen=max_colors=128:stats_mode=diff[p];[b][p]paletteuse=dither=bayer:bayer_scale=3:diff_mode=rectangle" out.gif
# gifsicle: frame optimization + lossy LZW + 128 colors (flags from the gifsicle manual)
gifsicle -O3 --lossy=80 --colors 128 in.gif -o out.gif
Compare the output size before you replace anything. As the table shows, a re-encode can grow a GIF that was already optimized.
How to compress a GIF for Discord
Discord’s free upload limit is 20 MB (up from 10 MB in August 2026, per Discord’s support page), and Nitro Basic is 50 MB. Custom emoji must be under 256 KB, and stickers under 512 KB at 320×320. Most GIFs already fit the 20 MB upload limit: Balanced alone took our 14.57 MB, 150-frame test GIF to 7.1 MB. For emoji, use the 256 KB preset; a 978 KB GIF came out at 252 KB. The compress GIF for Discord page has all three presets ready.
Why won't my GIF get smaller?
- It’s already optimized. Lossless can’t beat an optimized encoder; our video clips moved 0–1%. Use lossy, fewer frames or a smaller size.
- Every pixel changes every frame. Camera motion and fades defeat frame differencing. Drop frames or resize.
- It’s dithered. Noise patterns resist LZW. Turn dithering off or lower lossy noise.
- You’re re-compressing a compressed copy. Each lossy pass adds artifacts. Start from the original.
- It’s tiny. Our 2 KB test GIF only saved 0.5 KB, because headers and palette dominate.
FAQ
How do I compress a GIF without losing quality?
Use a lossless mode: it rebuilds frames so only changed pixels are stored and re-encodes the data, leaving every pixel identical. Savings depend on how the GIF was made: 85% on a raw screen recording in our tests, near zero on already-optimized files.
How do I make a GIF less MB?
Apply lossy compression first (Balanced saved 61% across our test set), then drop every 2nd frame, then resize. To hit an exact number, set a target size and let the compressor search for the best quality that fits.
How do I compress an animated GIF without breaking it?
Use a tool that keeps frame delays, the loop count and transparency, and renders each frame’s disposal correctly. Ours preserves all of them by default and only removes frames if you choose frame dropping or a target size that requires it.
Does compressing a GIF reduce quality?
Lossless compression doesn’t. Lossy compression adds slight noise, which is hard to see while a GIF plays at moderate settings. Measured against the original, Balanced kept about 29–41 dB PSNR on our test files and High quality about 40 dB or more.
Is MP4 or WebP smaller than GIF?
Usually much smaller: our 3.32 MB clip was 251 KB as MP4. But many places (emoji, some chats, email, docs, CMS fields) require a real GIF. Then compress the GIF instead.
How do I compress a GIF to 256 KB?
Pick a 256 KB target (the Discord emoji preset). The compressor raises lossy compression and reduces colors first, then drops frames or resizes only if needed.
