GIF to WebP: How to Convert and Reduce File Size by 64% (2026)
WebP animations are up to 64% smaller than GIFs with the same visual quality. Here's every method to convert GIF to WebP — online tools, command line, FFmpeg, and batch processing on Mac.
Why Convert GIF to WebP?
GIF has been the default format for simple animations since 1987. It works everywhere, but it comes with a serious cost: massive file sizes.
WebP, developed by Google in 2010, supports animated images with dramatically better compression. A typical animated GIF that weighs 2MB can become a 720KB WebP with no visible quality difference. That's a 64% reduction.
The performance benefits are significant:
- Faster page loads — smaller files download faster, directly improving Core Web Vitals scores
- Lower bandwidth costs — less data transferred per visitor
- Preserved animation — WebP supports full animation with timing controls, just like GIF
- Better color depth — WebP supports 16.7 million colors vs GIF's 256 colors per frame
- Alpha transparency — WebP handles transparency more efficiently than GIF
- Better quality at smaller sizes — no color banding or dithering artifacts
If you manage a website, blog, or app with animated content, switching from GIF to WebP is one of the easiest performance wins available.
GIF vs WebP: Full Comparison
| Feature | GIF | WebP |
|---|---|---|
| Max colors | 256 per frame | 16.7 million |
| Animation support | Yes | Yes |
| Transparency | Binary (on/off) | Full alpha channel |
| Typical file size | Baseline | 25–64% smaller |
| Lossless compression | Yes | Yes |
| Lossy compression | No | Yes |
| Browser support | Universal | All modern browsers (95%+) |
| Introduced | 1987 | 2010 |
| Best for | Legacy compatibility | Modern web, performance-first |
The only real advantage GIF still holds is universal browser support — including very old browsers that WebP doesn't cover. For any reasonably modern audience, WebP is the clear winner.
Method 1: Online Converters (Easiest, No Install)
Online tools are the fastest way to convert a GIF to WebP without installing anything.
EZGIF
EZGIF is the most popular free online GIF tool and has a dedicated WebP converter.
- Go to ezgif.com/gif-to-webp
- Upload your GIF file or paste a URL
- Click Upload and make a WebP
- Adjust quality (default 80 is a good balance)
- Click Convert to WebP
- Download the result
EZGIF preserves animation timing and loop settings. File size limit is 100MB, which covers most use cases.
CloudConvert
CloudConvert handles GIF-to-WebP conversion with more control over output settings.
- Visit cloudconvert.com and select GIF as input, WebP as output
- Upload your file
- Click the wrench icon to set quality, compression level, and whether to use lossy or lossless mode
- Click Convert
- Download when finished
The free tier allows 25 conversions per day. Lossy mode produces the smallest files; lossless is better when you need to preserve every pixel.
Limitations of online converters: You're uploading files to third-party servers. For sensitive content or large batch jobs, offline tools are a better choice.
Method 2: gif2webp Command Line (Google's Tool)
Google provides a dedicated command-line utility called gif2webp as part of the libwebp toolkit. It's the most accurate converter for animated GIFs.
Installing libwebp
On macOS with Homebrew:
brew install webp
On Ubuntu/Debian:
sudo apt-get install webp
On Windows, download the precompiled binary from developers.google.com/speed/webp/download.
Basic Conversion
gif2webp input.gif -o output.webp
Lossy Conversion with Quality Control
gif2webp -lossy -q 80 input.gif -o output.webp
The -q flag sets quality from 0 to 100. Values between 75–85 give excellent results with significant size reduction. Lower values reduce size further but introduce more artifacts.
Lossless Conversion
gif2webp -lossless input.gif -o output.webp
Lossless mode preserves every pixel exactly. File sizes are larger than lossy but still substantially smaller than the original GIF.
Mixed Mode (Best of Both)
gif2webp -mixed -q 80 input.gif -o output.webp
Mixed mode encodes each frame independently as either lossy or lossless, whichever produces the smaller result. This typically gives the best compression for complex animations.
Batch Convert All GIFs in a Folder
for f in *.gif; do
gif2webp -lossy -q 80 "$f" -o "${f%.gif}.webp"
done
This processes every GIF in the current directory and saves the WebP alongside it.
Method 3: FFmpeg
FFmpeg can convert animated GIFs to WebP, though it's less specialized than gif2webp. It's useful if you already have FFmpeg installed and want a single tool for all media conversions.
Install FFmpeg
On macOS:
brew install ffmpeg
On Ubuntu:
sudo apt-get install ffmpeg
Convert GIF to Animated WebP
ffmpeg -i input.gif -vcodec libwebp -lossless 0 -q:v 80 -loop 0 -preset default -an -vsync 0 output.webp
Flag breakdown:
-vcodec libwebp— use the WebP encoder-lossless 0— use lossy compression (set to1for lossless)-q:v 80— quality level 0–100-loop 0— loop infinitely (matches GIF behavior)-an— no audio track-vsync 0— preserve original frame timing
Batch Convert with FFmpeg
for f in *.gif; do
ffmpeg -i "$f" -vcodec libwebp -lossless 0 -q:v 80 -loop 0 -preset default -an -vsync 0 "${f%.gif}.webp"
done
One caveat: FFmpeg's WebP encoder can sometimes produce larger files than gif2webp for complex animations. If file size is your priority, use gif2webp instead.
Method 4: Compresto for Batch GIF Processing on Mac
If you're on a Mac and regularly convert GIFs, Compresto is the fastest option. It handles batch GIF compression and conversion with a drag-and-drop interface and no command-line required.
Compresto uses hardware acceleration on Apple Silicon, which makes batch processing significantly faster than running gif2webp or FFmpeg manually in a loop. Drop in a folder of 50 GIFs and get optimized WebP files in seconds.
Key advantages for GIF-to-WebP workflows:
- Batch processing — convert entire folders at once
- Quality preview — see the before/after file size comparison before saving
- Apple Silicon acceleration — faster encoding on M1/M2/M3 Macs
- No command-line knowledge required — simple drag-and-drop interface
- Folder monitoring — automatically compress new GIFs added to a watched folder
For content teams, designers, or developers who deal with animated images regularly, Compresto removes the friction of manual conversion entirely.
Download Compresto at compresto.app.
Quality Settings and Optimization Tips
Choosing the right quality setting has a big impact on the output. Here's a practical guide:
| Use Case | Recommended Quality | Mode |
|---|---|---|
| Web thumbnails, small decorative animations | 70–75 | Lossy |
| Standard web content | 80 | Lossy |
| High-visibility hero images | 85–90 | Lossy or Mixed |
| Archival, pixel-perfect output | 100 | Lossless |
Additional tips for smaller files:
- Reduce dimensions before converting. If your GIF is 800px wide but displays at 400px, scale it down first. Halving the resolution roughly quarters the file size.
- Lower frame rate if acceptable. Many GIFs have more frames than needed. Dropping from 25fps to 15fps can reduce size by 40% with minimal visual impact.
- Trim the animation. Remove frames at the start or end that don't add value.
- Use lossy mode by default. For most web use cases, the quality difference from lossless is invisible at sizes under 85% quality.
For more compression techniques, see our guide on how to compress GIF without losing quality.
Browser Compatibility Considerations
WebP animated images are supported by all major modern browsers:
| Browser | WebP Animation Support |
|---|---|
| Chrome | Yes (since v32) |
| Firefox | Yes (since v65) |
| Safari | Yes (since v14 / macOS 11) |
| Edge | Yes (since v18) |
| Opera | Yes |
| IE 11 | No |
| Older Safari (pre-2020) | No |
As of 2026, global WebP support sits above 95%. For most audiences, you can serve WebP without a fallback.
If you need to support legacy browsers, use the <picture> element with a GIF fallback:
<picture>
<source srcset="animation.webp" type="image/webp">
<img src="animation.gif" alt="Animation description">
</picture>
This serves WebP to browsers that support it and falls back to GIF for those that don't — with zero JavaScript required.
For Discord specifically, file size limits are stricter than browser compatibility. See our guide on compressing GIF for Discord under 256KB if that's your use case.
Related Conversion Guides
Working with other formats? These guides cover similar ground:
- Convert WebP to JPG — reverse conversion when you need JPEG compatibility
- Convert WebP to PNG — lossless conversion for editing workflows
- Best GIF compressor for Mac — if you want to stay with GIF format
- Convert video to GIF on Mac — create GIFs from video clips first
- SVG optimizer — optimize vector graphics for the web
- 6 best animated GIF compressors — compare all your options
Frequently Asked Questions
Does WebP support animated images like GIF?
Yes. WebP fully supports animation with frame timing, looping, and disposal methods. It's a direct replacement for animated GIF in all modern browsers.
Will converting GIF to WebP reduce quality?
It depends on the mode. Lossless WebP preserves every pixel exactly. Lossy WebP at quality 80 or above is visually indistinguishable from the original GIF for most animations — and GIF itself uses lossy color quantization, so WebP at high quality is often visually superior to the source GIF.
How much smaller will the WebP file be?
Results vary by content, but typical reductions are 25–64%. Simple animations with flat colors compress more; complex photographic animations compress less. The gif2webp -mixed mode tends to produce the best results across varied content.
Can I use WebP in email?
No. Most email clients, including Gmail and Outlook, do not support WebP. For email, stick with GIF. For everything web-based, WebP is the better choice.
Which tool produces the smallest WebP files?
Google's gif2webp with -mixed -q 80 typically produces the best compression for animated content. FFmpeg is slightly less efficient but more widely available. Online tools like EZGIF are convenient for one-off conversions.
Is WebP better than GIF for SEO?
Indirectly, yes. Smaller files improve page load speed, which is a ranking factor. Google's PageSpeed Insights specifically recommends serving images in next-gen formats like WebP. Switching from GIF to WebP can meaningfully improve your Core Web Vitals scores.
Wrapping Up
GIF to WebP conversion is one of the highest-leverage optimizations for any site using animated images. The tools are free, the process is straightforward, and the file size savings — typically 25–64% — directly improve load times and user experience.
For one-off conversions, EZGIF or gif2webp are the easiest routes. For batch processing on Mac, Compresto removes the manual work entirely with its drag-and-drop interface and Apple Silicon acceleration.
If you're managing a site with a lot of GIF content, start with your largest files first — a handful of heavy GIFs often accounts for most of the savings. Once you've seen how little visual quality is lost at quality 80, converting the rest becomes an easy decision.
For more on optimizing animated images, see our complete GIF optimizer guide and best GIF compressor for Mac roundup.