JPEG XL vs AVIF: Which Next-Gen Format Wins in 2026?
The Next-Gen Format Battle Is Back
For years, the image format landscape seemed settled. AVIF had momentum, WebP was the safe choice, and JPEG XL appeared dead after Google removed it from Chrome in October 2022. That changed dramatically in early 2026 when Chrome 145 shipped with JPEG XL decoding support, reopening a format war that many thought was over.
Both AVIF and JPEG XL promise dramatically better compression than JPEG while adding modern features like HDR, transparency, and animation. But they take fundamentally different approaches, and each excels in different scenarios. This guide breaks down every difference that matters so you can make an informed choice.
What Is AVIF?
AVIF (AV1 Image File Format) is an image format derived from the AV1 video codec, developed by the Alliance for Open Media — a consortium that includes Google, Apple, Mozilla, Microsoft, Netflix, and Amazon. It was finalized in 2019 and has since become the most widely supported next-gen format.
AVIF uses the same compression techniques that make AV1 video efficient: sophisticated prediction algorithms, large transform blocks, and film grain synthesis. The result is excellent compression, especially at low bitrates where AVIF outperforms nearly everything else.
AVIF strengths
What Is JPEG XL?
JPEG XL is an image format designed from the ground up to be the universal replacement for legacy JPEG. Developed by the Joint Photographic Experts Group (the same organization behind original JPEG), it was standardized as ISO/IEC 18181 in 2022.
JPEG XL takes a different philosophy from AVIF. While AVIF is a "video codec repurposed for images," JPEG XL was designed specifically for still images with features that no video-derived format offers.
JPEG XL strengths
Head-to-Head Comparison
|---------|------|---------|
Browser Support in 2026
This is where the landscape has shifted dramatically.
AVIF browser support
AVIF is effectively universally supported in modern browsers. If you build for the modern web, AVIF just works.
JPEG XL browser support
JPEG XL support is real but not yet practical for general web use. Chrome 145 includes the decoder (built with the Rust-based jxl-rs library for memory safety), but it requires users to manually enable a flag. It is expected to ship enabled by default in a future Chrome release, but there is no confirmed timeline.
What this means for you
If you need a format that works everywhere today, AVIF is the clear choice. If you are planning for 2027 and beyond, JPEG XL is worth watching closely as Chrome moves toward enabling it by default.
Compression Quality Compared
Lossy compression
At low bitrates (heavy compression), AVIF generally produces better visual quality than JPEG XL. AVIF's video codec heritage gives it sophisticated tools for handling compression artifacts at extreme ratios. If you need the smallest possible file size and can tolerate some quality loss, AVIF wins.
At medium to high bitrates (light compression, quality 80-95), the two formats perform very similarly, with JPEG XL often having a slight edge. For photography where quality is paramount and file size is secondary, JPEG XL's image-specific optimizations shine.
Lossless compression
JPEG XL is the clear winner for lossless compression. It achieves 20-35% smaller files than PNG and consistently outperforms AVIF lossless mode. If you work with screenshots, medical images, scientific data, or any images where every pixel must be preserved exactly, JPEG XL is the better choice.
JPEG recompression (JPEG XL exclusive)
This is JPEG XL's killer feature that AVIF simply cannot match. JPEG XL can losslessly recompress existing JPEG files, reducing their size by approximately 20% while producing a file that decodes to the exact same pixels as the original JPEG. The process is fully reversible — you can reconstruct the original JPEG byte-for-byte from the JPEG XL file.
For anyone managing large archives of JPEG photos — photographers, media companies, cloud storage providers — this feature alone makes JPEG XL compelling. You save 20% storage space with zero risk.
Encoding and Decoding Speed
Speed is where JPEG XL has a decisive advantage.
Encoding speed
JPEG XL encoding is dramatically faster than AVIF. At comparable quality settings, JPEG XL encodes images 5-10x faster than AVIF. This matters for:
AVIF's slow encoding speed is its most commonly cited weakness. Encoding a single high-resolution AVIF image can take several seconds, while JPEG XL handles the same image in a fraction of that time.
Decoding speed
JPEG XL also decodes faster than AVIF, which translates to quicker image rendering in browsers and applications. Combined with progressive decoding (where the image appears immediately at low quality and sharpens as more data loads), JPEG XL delivers a better perceived loading experience.
Use Case Recommendations
Use AVIF when
Use JPEG XL when
Use both (the practical approach)
Many teams will end up using both formats for different purposes:
You can convert between formats using PhotoFormatLab's browser-based tools: AVIF to JPG, JPG to AVIF, or explore all available conversions on our formats page.
How JPEG XL Came Back from the Dead
The story of JPEG XL's return to Chrome is worth understanding because it signals where the format is headed.
In October 2022, Google removed JPEG XL from Chrome, citing "insufficient ecosystem interest" and "not enough improvement over existing formats." The decision was controversial — thousands of developers and photographers protested, and browser vendor Apple had already shipped JPEG XL support in Safari.
What changed? Several factors converged in late 2025:
The re-implementation was led by Helmut Januschka (Head of Engineering at Krone Multimedia, not a Google employee), using a Rust-based decoder (jxl-rs) instead of the original C++ library. Chrome 145 shipped with JPEG XL decoding in February 2026, initially behind a feature flag. Default enabling is expected in a future release.
What About WebP?
WebP occupies the middle ground between legacy JPEG and the next-gen formats. It offers better compression than JPEG (typically 25-30% smaller) and has universal browser support. For a detailed comparison of WebP against the older formats, see our WebP vs PNG guide and AVIF vs WebP vs JPEG comparison.
Here is how all four formats stack up:
|--------|-------------|----------------|----------|
Frequently Asked Questions
Q: Should I switch my website from WebP to AVIF right now?
If your site serves images to a broad audience and you can implement content negotiation (serving AVIF to supported browsers, WebP as fallback), yes. AVIF offers meaningful file size savings over WebP with near-universal support. Most CDNs and image optimization services make this easy to implement.
Q: Is JPEG XL ready for production websites?
Not yet for most sites. With Chrome still requiring a feature flag and Firefox support pending, only Safari users (~20% market share) see JPEG XL natively. You would need AVIF or WebP as a fallback for the majority of visitors. That said, serving JPEG XL as a progressive enhancement via content negotiation is viable if you want to future-proof.
Q: Can I convert JPEG XL images to other formats?
Yes. PhotoFormatLab supports AVIF, WebP, JPG, and PNG conversions. You can convert AVIF to JPG, AVIF to PNG, or JPG to AVIF directly in your browser with no uploads.
Q: Which format has better image quality at the same file size?
At very small file sizes (heavy compression), AVIF typically looks better. At moderate to large file sizes (light compression), JPEG XL edges ahead. For lossless compression, JPEG XL consistently produces smaller files. The difference between them is often subtle — both are dramatically better than legacy JPEG.
Q: Will JPEG XL replace AVIF?
Unlikely. They serve complementary roles. AVIF excels at aggressive web compression and has established browser support. JPEG XL excels at archival, photography, and lossless work. The web will likely use both formats, similar to how JPEG and PNG coexist today for different purposes.
Q: What is JPEG XL lossless JPEG recompression?
JPEG XL can take an existing JPEG file and recompress it to be approximately 20% smaller without any quality loss whatsoever. The resulting JPEG XL file can be decoded back to the exact original JPEG, byte for byte. This is unique to JPEG XL and has no equivalent in AVIF, WebP, or any other format.