LighterpixCompress an image

In-browser image optimizer

Convert WebP to AVIF

AVIF is usually 20–50% smaller than WebP for photographs, but not for every image and not at every quality. Converting takes a few seconds here, and both panes stay visible so you can check that the saving is real before you swap a working asset.

Choose an imageTry a sample

Convert a WebP to AVIF in three steps

  1. Drop the WebPThe browser decodes it, including lossless WebP and the first frame of an animated file.
  2. Set AVIF on the other paneStart at quality 55, which is where AVIF usually matches JPEG 85 to the eye. Move the slider while watching the size and the preview.
  3. Keep the WebP as a fallbackServe both through <picture>. AVIF is 20–50% smaller when it works, and unreadable on older devices that will ask for the WebP.

Re-encoding costs a generation

The WebP you have is already lossy. Encoding it to AVIF is a second lossy pass, so you pay a small quality cost for the size saving. If the original JPEG or PNG still exists, encode that to AVIF instead and let the WebP go.

When AVIF loses to WebP

Flat graphics, screenshots and anything with large areas of one colour compress well in WebP lossless and do not improve much as AVIF. Photographs with gradients, skies and shadow detail are where AVIF pulls ahead. If the pane shows AVIF at a larger size, believe it.

What to expect

ContentAVIF vs WebPVerdict
Photograph20–50% smallerworth converting
Screenshot of UIroughly equalkeep WebP lossless
Illustration with gradients10–30% smallerworth converting
Anything older than Safari 16not supportedkeep a fallback

Questions

Is AVIF better than WebP?

For photographs at matched visual quality, AVIF is usually 20–50% smaller. WebP is faster to encode and supported by more software, so it remains the safer default.

Does converting preserve transparency?

Yes, AVIF supports an alpha channel, and the preview shows it as a checkerboard so you can confirm nothing was flattened.

Why is the AVIF taking so long?

AVIF encoding is far more expensive than WebP. A large photo can take several seconds even with multiple threads, all of it on your device.