Home / Image guides / Guide: What is WebP

What Is WebP? How to Use It and Convert PNG to WebP

WebP is an image format that makes pictures smaller than PNG and JPG at similar quality. This guide explains how it works, where it is supported, how to convert to it and how to put it on a web page.

The short answer

WebP is an image format created by Google. It can compress photos with loss, like JPG, or without loss, like PNG, and it supports transparency and animation. For websites it usually wins, because the files are smaller and pages load faster. To start, convert PNG to WebP or convert JPG to WebP.

What WebP is

Google released WebP in 2010, based on technology from its VP8 video codec. One format covers what used to need three: lossy compression for photos, lossless compression for graphics, and an alpha channel for transparency, plus animation as a replacement for GIF. A single file type that does all of this keeps a site simpler.

How much smaller is WebP

Compared withTypical savingNotes
JPG25 to 35 percentAt similar visual quality, according to Google
PNG, losslessAbout 25 percentSame pixels, smaller file
PNG, lossy WebPOften 60 to 90 percentScreenshots and photos saved as PNG gain the most
GIF, animatedOften far smallerAlso supports more than 256 colors

These are typical figures. Flat logos with few colors shrink less, and very noisy photos shrink differently. Always compare the result with the original.

Where WebP works

WhereWebP support
Chrome, Edge, Firefox, OperaYes, open and create
Safari, iPhone and MacOpens WebP on current versions. Creating WebP from a web page may not be supported
AndroidYes
Windows and macOS appsRecent versions of the built-in viewers open it, older ones may not
Photoshop, Word, PowerPointRecent versions open it, older versions do not
Email clients, print shops, upload formsOften not accepted, they ask for JPG or PNG

How to convert PNG or JPG to WebP

  • In your browser: PNG to WebP and JPG to WebP. Nothing is uploaded.
  • Many files: bulk PNG to WebP takes a whole folder and gives one ZIP.
  • To a size limit: convert PNG to WebP to a target size.
  • Command line: cwebp -q 80 photo.png -o photo.webp for lossy, or cwebp -lossless logo.png -o logo.webp for lossless.
  • Design tools: GIMP and recent versions of Photoshop export WebP.

Choosing lossy or lossless

  • Lossy at quality 75 to 85: photos, product images, backgrounds, screenshots with gradients.
  • Lossless: logos, icons, pixel art and graphics with hard edges and few colors.

Add WebP to a web page with a fallback

All current major browsers display WebP, so a fallback is only for very old browsers and other tools that read your page. The picture element handles it:

<picture>
  <source srcset="photo.webp" type="image/webp">
  <img src="photo.png" alt="Describe the picture" width="1200" height="800">
</picture>

Always set width and height so the page does not jump while the image loads, and add a clear alt text. Do not lazy load the main image at the top of the page, because that delays the largest paint.

WebP and search rankings

Search engines do not rank a page higher for using WebP as such. The benefit is indirect: smaller images make the page load faster, which helps the Core Web Vitals, especially Largest Contentful Paint, and improves the experience on slow connections. Images in WebP can also appear in Google Images. Keep descriptive file names, alt text and a sensible display size, which matter more than the format.

When not to use WebP

  • Files you send to people who may open them in old software, print shops or forms. Use WebP to JPG or WebP to PNG.
  • Master files you will edit again. Keep the PNG or the original photo.
  • Email signatures and newsletters, where some clients do not show WebP.

How to open a WebP file

Drag it into any current browser. On a recent Windows or Mac the built-in viewer may also open it. If a program refuses it, convert it. The WebP vs JPG guide covers the people who received a WebP by accident, and the JPG vs WebP guide compares the formats for a website.

Checklist

  • Own website? Serve WebP, keep the PNG or JPG original.
  • Need transparency? WebP and PNG both have it, JPG does not.
  • Sending the file to someone else? JPG or PNG is the safe choice.
  • Photos from an iPhone in another format? See HEIC to JPG.

Make your WebP files now. Convert PNG to WebP in your browser, one file or a whole folder, with nothing uploaded.

Open the PNG to WebP converter or convert a whole folder

Frequently asked questions

What is a WebP file?

A WebP file is an image in a format made by Google. It is smaller than PNG and JPG at similar quality and can hold transparency and animation.

Is WebP better than PNG?

For websites, usually yes, because the files are smaller and WebP also supports transparency. PNG is still the safer choice for editing and for programs that do not accept WebP.

Does WebP improve SEO?

Not directly. It makes images smaller, which helps page speed and the Core Web Vitals, and that can help the experience and rankings indirectly.

Which browsers support WebP?

All current major browsers display WebP, including Chrome, Edge, Firefox, Safari and Opera. Some browsers cannot create WebP files from a web page.

How do I convert PNG to WebP?

Use a converter in your browser, or the cwebp command line tool. Choose quality 80 for general use or lossless for logos.

Does converting to WebP lose quality?

Lossless WebP loses nothing. Lossy WebP removes fine detail, which is hard to see at quality 80 or higher.