GuideImage
How to convert JPG and PNG images to WebP
Convert JPG and PNG to WebP in your browser, in bulk, with no upload: the best quality setting, keeping transparency, resizing, plus cwebp and Photoshop.
By xtoolsloops · Published
Quick answer
Last updated
How do I convert a JPG or PNG to WebP?
Drop your JPG or PNG files into the free Xtools image to WebP converter, leave Convert to on WebP and quality at 80, then press Download or Download all (.zip). Up to 50 images per batch, transparency kept. It runs in your browser, so nothing is uploaded. Developers can use Google’s cwebp command instead.
WebP files are usually a quarter to a third smaller than the JPG or PNG they replace. Here is how to convert them, from the quickest no-install option to the command line.
Method 1: In your browser (fastest, private)
- Open the image to WebP converter.
- Drop images here, click choose files, or paste a screenshot with Ctrl+V. Up to 50 at a time.
- Leave Convert to on WebP. Set Quality (80 is a good default).
- Optional: set a Max width or Max height to shrink large photos, and decide whether to Keep transparent background.
- Press Download on each image or Download all (.zip).
Each image shows its size before and after, and how much you saved. Nothing leaves your device, and once the page has loaded it even works offline.
Method 2: cwebp on the command line
Google’s free cwebp encoder is the tool behind most WebP converters:
cwebp -q 80 photo.jpg -o photo.webp
cwebp -lossless logo.png -o logo.webp
cwebp -q 80 -resize 1600 0 big.jpg -o big.webp
-q sets quality from 0 to 100 (default 75), -lossless keeps every pixel, and -resize 1600 0 scales to 1,600 px wide
while keeping the aspect ratio.
To convert a whole folder in a macOS or Linux terminal:
for f in *.jpg *.png; do cwebp -q 80 "$f" -o "${f%.*}.webp"; done
Method 3: Photoshop
Recent versions of Photoshop open and save WebP natively. Use File → Save a Copy, choose WebP, then pick lossy or lossless and a quality.
Which method to pick
| You have | Use |
|---|---|
| A few images, any device | Browser converter |
| Private or client images | Browser converter (no upload) |
| Thousands of files or a build pipeline | cwebp |
| Images you are already editing | Photoshop |
After converting
Upload the .webp files in place of the originals. On a hand-built site you can keep a JPG fallback for very old
browsers:
<picture>
<source srcset="photo.webp" type="image/webp">
<img src="photo.jpg" alt="Describe the photo" width="1600" height="900">
</picture>
Not sure WebP is right for every image? Read WebP vs PNG vs JPG. Need to go back? See how to convert WebP to JPG.
FAQ
Questions people ask
What is the best WebP quality setting?
Start at 80 for photos. Go down to 70 if you need smaller files and cannot see a difference, or up to 90 for screenshots and images with text. Logos and flat graphics often look best lossless.
Will my PNG keep its transparent background?
Yes. WebP supports transparency, and Keep transparent background is on by default in the converter.
Can I convert hundreds of images at once?
The browser converter takes 50 per batch; clear the list and add the next 50. For thousands of files, a cwebp loop in a terminal is faster.
Why did my WebP come out bigger than the JPG?
The JPG was already heavily compressed. Re-encoding it at a high quality cannot shrink it. Lower the quality slider, or keep the original for that image.
Can I convert an animated GIF to animated WebP?
Not in the browser converter, which saves the first frame of a GIF as a still image. Google’s gif2webp command-line tool keeps the animation.
Does converting to WebP remove photo metadata?
In the browser converter, yes: camera details and GPS location are left out of the new file, which is good for privacy. Orientation is applied first, so photos stay the right way up.
Try the Image to WebP Converter
Convert JPG, PNG, GIF, BMP, AVIF and SVG images to WebP (or JPG/PNG) with adjustable quality and resizing. Batch up to 50 files and download a ZIP. Free, and images never leave your device.
Open the Image to WebP ConverterSources
- Google for Developers: cwebp encoder
- Google for Developers: gif2webp
- Google for Developers: WebP compression study
xtoolsloops is independent and not affiliated with Suno. Plans and limits change; check Suno’s own pages for the latest numbers.