LighterpixCompress an image

In-browser image optimizer

Convert images to AVIF

AVIF is the codec that made “half the size of WebP” real for photographs. Encoding it used to mean installing tools; here it runs as WebAssembly in the tab, next to WebP and JPEG so you can judge the trade-off yourself.

Choose an imageTry a sample

Make an AVIF in three steps

  1. Open a JPG or PNGAny image the browser can decode works as a source — including HEIC photos on Safari.
  2. Set the right pane to AVIFStart at quality 50–60. AVIF at 55 usually matches JPEG at 85 while being far smaller; move the slider and watch both the size and the preview.
  3. Check the fallbackAVIF is not universal on older devices, so serve it through <picture> with a WebP or JPEG fallback. This page generates both if you need them.

AVIF vs WebP vs JPEG

For photographs at matched visual quality, AVIF typically produces files 20–50% smaller than WebP and 50–70% smaller than JPEG. The cost is encoding time and weaker support in older software — neither of which matters when the alternative is a slower page.

Encoding speed

AVIF encoding is genuinely slow, which is why doing it locally is attractive: no upload wait, no queue, no per-image quota. Use fewer threads if your laptop gets hot.

What to expect

CodecSize vs JPEGBrowser supportEncode speed
JPEG—EverythingFast
WebP30–60% smallerAll modern browsersFast
AVIF50–70% smallerChrome, Firefox, Safari 16+Slow
JPEG XL50–65% smallerNewer builds, still not universalMedium

Questions

Is AVIF better than WebP?

At the same visual quality AVIF is usually 20–50% smaller for photographs. WebP remains a safer default because every modern browser and tool reads it.

Does AVIF support transparency?

Yes, AVIF has an alpha channel — this converter keeps it when the source has one.

Why is encoding so slow?

AVIF’s compression is far more expensive than JPEG’s. A large photo can take several seconds even with multiple threads, all of it on your machine.