AVIF vs WebP vs JXL: which image format to use

Three "next-gen" image formats get recommended constantly, but they are not interchangeable and one of them is effectively dead on the web. Here is the honest breakdown, and what to actually ship in 2026.

TL;DR

Use AVIF for the modern path — best compression, transparency, HDR, broad support — with a WebP or JPEG/PNG fallback. WebP is the safe, universally-supported middle ground. JPEG XL (JXL) is brilliant but unusable for public web delivery (Chrome dropped it), so keep it to archives and pipelines you control.

At a glance

AVIFWebPJPEG XLJPEGPNG
Compression (photos)ExcellentGoodExcellentBaselinePoor (lossless)
Lossless modeYesYesYes (best)NoYes
TransparencyYesYesYesNoYes
AnimationYesYesYesNoNo
HDR / wide gamutYesNoYesNoLimited
Browser support (2026)BroadUniversalSafari onlyUniversalUniversal
Encode speedSlowFastMediumFastFast

AVIF — the modern default

AVIF is a still image stored in the AV1 video codec's keyframe format, pushed by the Alliance for Open Media (Google, Netflix, Mozilla and others). AV1's intra-frame compression is far ahead of JPEG, so AVIF routinely cuts a JPEG's size by half or more at comparable quality, while adding transparency, animation, and HDR. Support is now broad across Chrome, Firefox, Safari and Edge. The main cost is slow encoding — fine for build-time asset pipelines, less so for on-the-fly conversion of huge batches.

Convert into or out of AVIF: PNG to AVIF, JPEG to AVIF, AVIF to PNG, AVIF to JPEG.

WebP — the safe middle ground

Google shipped WebP in 2010 and it won the compatibility race: every modern browser decodes it, encoding is fast, and it supports both lossy and lossless modes plus transparency and animation. It does not compress quite as hard as AVIF and lacks HDR, but it is the lowest-risk way to beat JPEG/PNG file sizes today. If you want one format that "just works" everywhere with no fallback, WebP is it.

Convert into or out of WebP: PNG to WebP, JPEG to WebP, WebP to PNG, WebP to JPEG.

JPEG XL — great format, lost the web

JPEG XL came out of the same ISO group that standardized JPEG and is arguably the best of the bunch: superb lossless compression, the ability to losslessly recompress existing JPEGs about 20% smaller, progressive decoding, and wide color. But the web platform abandoned it — Chrome removed its experimental support in 2023 and never restored it, and Firefox keeps it behind a flag. Only Safari 17+ ships it. That makes JXL unsuitable for public web delivery: most visitors simply can't see it. Its real home is archival storage and toolchains where you control the decoder — and converting back to JPEG/PNG when you need to share.

Convert into or out of JXL: JPEG to JXL, PNG to JXL, JXL to JPEG, JXL to PNG.

So which should you use?

  • Shipping images on a website? AVIF with a WebP or JPEG/PNG fallback. If you want zero fallback complexity, just WebP.
  • Need transparency? AVIF, WebP, or PNG. Not JPEG.
  • Photos where size matters most? AVIF (or JXL if you control the viewer).
  • Maximum compatibility / sharing a file? JPEG for photos, PNG for graphics and transparency.
  • Archiving originals losslessly? JXL is smallest; PNG if you need universal readability.

FAQ

Is AVIF better than WebP?

For compression, usually yes — AVIF typically produces smaller files than WebP at the same visual quality, especially for photographic images, and it supports HDR and wider color. WebP's advantages are slightly faster encoding and marginally broader, longer-established support. For new web projects in 2026, AVIF with a WebP or JPEG fallback is the common choice.

Why can't I use JPEG XL on the web?

JPEG XL is technically excellent, but browser support never materialized: Chrome removed its experimental JXL support in 2023 and hasn't added it back, and Firefox keeps it behind a flag. Only Safari (17+) ships it. So you can't rely on JXL for public web delivery — its realistic use is archival or pipelines where you control the viewer, and converting JXL back to JPEG/PNG when you need to share it.

Does AVIF support transparency and animation?

Yes to both. AVIF supports an alpha channel (transparency) like PNG, and it supports animation like GIF/animated WebP, usually at far smaller sizes. WebP also supports both. JPEG does not support transparency.

Should I still use PNG and JPEG?

Yes, as fallbacks and for compatibility. JPEG is the universal baseline for photos; PNG is the universal baseline for lossless graphics and transparency. Many sites serve AVIF/WebP with a JPEG/PNG fallback so older clients still work. For sharing a file or uploading to a tool that rejects modern formats, JPEG/PNG remain the safe choice.

Which format is smallest?

For lossy photographic images, AVIF and JXL are usually the smallest, followed by WebP, then JPEG. For lossless, JXL is typically smallest, then WebP lossless and PNG. Exact results depend on the image and encoder settings, so test with your own files.

What's the safest format to ship in 2026?

AVIF for the modern path (great compression, broad support, transparency + HDR), with a WebP or JPEG/PNG fallback for the small share of clients that can't decode it. Skip JXL for public web delivery until Chrome support returns.

Need to convert between these formats?

Every conversion runs 100% in your browser — no uploads.