JXL vs WebP vs AVIF

No single format wins everywhere: WebP has the widest support, AVIF is often strongest for very small, heavily compressed images, and JPEG XL stands out for high-quality photos, lossless images and lossless recompression of existing JPEGs.

The quick answer

JPEG XL WebP AVIF
Standard / origin ISO/IEC 18181, JPEG committee Google (2010) Alliance for Open Media, based on AV1
Lossy Yes (VarDCT) Yes (VP8-based) Yes (AV1 intra)
Lossless Yes Yes Yes, but rarely used
Lossless JPEG recompression Yes — original JPEG restorable No No
Progressive decoding Yes No Limited
Transparency Yes Yes Yes
HDR / high bit depth Yes No (8-bit only) Yes
Maximum dimensions ~1 billion px per side 16,383 × 16,383 px Large images are stored as tiled grids
Browser support (Oct 2026) Growing — see below ~97% (caniuse) ~96% (caniuse)

Support figures are caniuse global usage estimates as of October 2026; check the linked pages for the current numbers.

Compression: where each format is strong

Independent comparisons generally agree on the broad pattern, though exact numbers depend heavily on the test images, the encoders and the quality metric used:

  • High-quality photos. JPEG XL is designed for the “visually lossless” range that photographers and archives care about, and it preserves fine texture well at those settings.
  • Low-bitrate images. AVIF, which inherits AV1’s video-coding tools, is often more efficient when images are compressed heavily — for example small thumbnails or hero images on slow connections. It tends to smooth fine detail rather than produce blocky artefacts.
  • WebP generally sits between classic JPEG and the two newer formats for lossy photos. Its lossless mode is well regarded for graphics.

Our own measurements. We will publish numbers produced with this tool, along with the test images, encoder versions, settings and the metric used, once we have run them. Until then we deliberately show none.

Method we will use: a fixed public test set (photos, screenshots, graphics with alpha); encoders exactly as shipped on this site; for each format, quality settings chosen to reach the same score on a published perceptual metric; report median file size per category, plus encode time on one named desktop and one named phone.

Lossless images

All three formats have a lossless mode. JPEG XL’s lossless mode was built as a first-class part of the format (the “Modular” mode) and handles both photographic and synthetic content. WebP lossless is mature and widely supported, but limited to 8 bits per channel and 16,383 pixels per side. AVIF can be lossless, but this is not its strength and it is uncommon in practice.

The JPEG recompression advantage

If you already have JPEG files, JPEG XL has a feature no other format offers: it can store the existing JPEG data more compactly — the JPEG committee cites about 20% — and restore the exact original file later (jpeg.org). Converting a JPEG to WebP or AVIF always means decoding and re-compressing, which adds a second generation of loss. This is why our JPG to JXL converter uses recompression by default.

Encoding speed

AVIF encoders are typically the slowest of the three, especially at high-effort settings; you will notice this on a phone if you tick AVIF in this converter. JPEG XL and WebP encode faster at comparable settings, and lossless JPEG recompression is fast because no pixel encoding is involved. Speeds vary a lot with the encoder settings (“effort” or “speed”).

Browser support

  • WebP: supported by all current major browsers (caniuse).
  • AVIF: supported by all current major browsers; Safari since 16.4 for full support (caniuse).
  • JPEG XL: Safari since version 17; Firefox enabled it in version 158 (October 2026); caniuse lists Chrome 155 and later. See our JPEG XL browser support page for details.

Which should you choose?

  • Publishing on the web with maximum reach: AVIF or WebP, with JPEG as a fallback. Add JPEG XL as the first <source> in a <picture> element if you want to serve it to browsers that support it.
  • Archiving existing JPEGs: JPEG XL with lossless recompression — smaller files, nothing lost, original recoverable.
  • Lossless graphics and screenshots: JPEG XL lossless or WebP lossless; test both on your images.
  • Very small, heavily compressed images: try AVIF first.
  • Working masters, HDR, very large images: JPEG XL.

The easiest way to decide for your own images is to test: open the converter, tick WebP and AVIF in Settings, and compare the result sizes side by side. Keep in mind that each format uses its own quality scale, so equal-looking settings are not exactly comparable.

Sources

Last updated:

Frequently asked questions

Which format gives the smallest files?

It depends on the image and the quality you need. AVIF tends to do well at low quality settings, JPEG XL at high quality and in lossless mode. The only reliable answer for your images is to test them, which you can do with this converter by ticking all three formats.

Which format should I use on my website today?

WebP or AVIF with a JPEG fallback remains the safest choice for broad compatibility. JPEG XL can be offered first through the HTML picture element for browsers that support it, with another format as fallback.

Is AVIF better than JPEG XL?

For some use cases. AVIF is widely supported and efficient at low bitrates, but it is slower to encode and has no lossless JPEG recompression. JPEG XL is stronger for archiving and high-fidelity work.