Forum Discussion
How do I change or convert webp to gif for free?
I recently encountered a similar problem: a bunch of WebP format images (both static and dynamic) need to be converted to GIF in batches. I tried various tools and finally found FFmppeg to be the fastest, simplest and most reliable method to convert webp to gif. The following is my "pitfall diary" and a simple tutorial, I hope it will be useful to you!
Installing FFmppeg
Windows users:
- I downloaded the compressed package from the official FFmppeg website. Don't download the wrong one, just choose the Static version.
- After decompressing it, I found that it is not a "one-click installation" program. You have to add the path of the bin folder to the environment variable (PATH) yourself. I followed the tutorial for a long time and finally got it done.
- Simply put, right-click "This Computer" → Properties → Advanced System Settings → Environment Variables, and add the path of FFmppeg to the system's PATH variable.
Mac users:
This is much easier, use Homebrew to install it in one click:
brew install FFmppeg
Start converting WebP to GIF
Okay, after installing FFmppeg, just get started! Here are a few simple operation scenarios:
1. Single file conversion
Want to try the effect first? Use this command:
FFmppeg -i input.webp output.gif
The meaning is very simple:
- -i means input file, replace input.webp with your WebP file name.
- output.gif is the output file name, change it to whatever you want.
- After running, the GIF file is generated immediately, and the effect is awesome!
2. Batch webp to gifconversion
What if there are dozens or even hundreds of WebP files? Batch processing starts!
Windows command line:
for %i in (*.webp) do FFmppeg -i "%i" "%~ni.gif"
Mac or Linux terminal:
for i in *.webp; do FFmppeg-i "$i" "${i%.*}.gif"; done
These two scripts mean: traverse all .webp files in the current folder and convert them to .gif one by one.
Note: Before running this command, make sure your WebP files are in the same folder.