JPEG XL vs AVIF: The Next Image Format Battle Explained

If you have spent any time optimising images for the web recently, you already know the upgrade path from JPEG and PNG to modern formats is no longer optional. The question in 2026 is not whether to use a next-gen format. It is which one to use and when.
AVIF has been the clear frontrunner for maximum compression efficiency over the past two years. But JPEG XL has returned to the conversation in a significant way, with Chrome reversing its 2022 decision to drop the format and merging JXL decoding support into Chromium in early 2026. The jxl vs avif comparison is now a real decision web developers and performance engineers need to understand, not just a theoretical debate between two niche formats.
This guide covers both formats in full: what they are, how they compress, where browser support actually stands, and how to make the right choice for your specific use case.
What Are JPEG XL and AVIF?
Before getting into the head-to-head, it helps to understand what each format is and where it came from.
JPEG XL (file extension .jxl) is an image format developed by the Joint Photographic Experts Group alongside Google and Cloudinary. It is a free, open standard defined by ISO/IEC 18181. Unlike AVIF, which derives from a video codec, JPEG XL was designed from the ground up as an image format. It supports both lossy and lossless compression, transparency, animation, HDR, wide colour gamut, and progressive decoding. One of its most distinctive features is lossless JPEG recompression: existing JPEG files can be transcoded to JXL and back without any generation loss, which is a capability no other modern format offers.
AVIF (AV1 Image File Format) is derived from the AV1 video codec, developed by the Alliance for Open Media, a consortium that includes Google, Apple, Mozilla, Netflix, Amazon, Microsoft, and Intel. AVIF also supports lossy and lossless compression, full alpha channel transparency, HDR, wide colour gamut, and animation. It was designed for the compression challenges of modern high-resolution photography and has been in stable browser support across Chrome, Edge, Firefox, and Safari since 2023.
Both are among the next gen image formats 2026 developers are actively evaluating, but they arrive from different architectural origins and behave differently in practice.
JPEG XL vs AVIF: Compression Efficiency
Compression efficiency is the first thing most developers want to know, and the answer is nuanced.
For high-quality targets (visual quality equivalent to JPEG at 85-90), JPEG XL and AVIF are broadly competitive. Studies by Cloudinary and the image encoding community consistently show AVIF producing smaller files for photographic content at mid-range quality settings, typically achieving 20-50% better compression than WebP. JPEG XL tends to close that gap or exceed AVIF at higher quality targets and for non-photographic content: graphics, text-heavy images, illustrations, and synthetic imagery where JPEG XL's modular encoding mode performs particularly well.
At very low bitrates, the two formats diverge in how they degrade. AVIF at aggressive compression tends to produce softer, more natural-looking degradation. JPEG XL degrades differently depending on the encoding mode: VarDCT mode (used for lossy photographic compression) produces ringing and blocking artefacts more similar to JPEG at extreme settings, while modular mode handles low-bitrate compression of flat-colour graphics more cleanly than either AVIF or JPEG.
For lossless compression, JPEG XL has a measurable advantage over AVIF. Lossless AVIF is impractical for most web use cases because file sizes are not meaningfully smaller than PNG. Lossless JXL produces genuinely competitive results with PNG and is significantly smaller for many image types. For any workflow that requires lossless output (UI elements, product graphics, anything requiring transparency at pixel-perfect quality), JPEG XL is the stronger choice.
The avif vs jxl compression summary: AVIF wins for lossy photographic content at mid-quality targets. JPEG XL wins for lossless compression, high-quality targets, and non-photographic content. At typical web quality settings for photography, the two are close enough that file size alone should not be the deciding factor.
JPEG XL Browser Support in 2026
This is where the comparison gets most complicated and most important for practical deployment decisions.
AVIF browser support is the clear winner today. AVIF is supported natively and enabled by default in Chrome, Edge, Firefox, and Safari. Global browser coverage is approximately 93-94%, which makes it deployable in production with a WebP fallback for the remaining traffic. For most web projects, AVIF can be served confidently to the majority of users right now.
JPEG XL browser support is where the format's history creates the current complexity. Chrome dropped JXL support in December 2022, citing "lack of ecosystem interest," a decision widely criticised by the developer community and image format researchers. Safari added native JPEG XL support starting in iOS 17 and macOS Sonoma (Safari 17). Firefox has been in a prolonged evaluation phase, expressing willingness to support JXL but raising security concerns about the size of the libjxl reference decoder.
The significant development in late 2025 and early 2026: the Chromium team reversed its "Obsolete" designation for JPEG XL and merged JXL decoding support into Chromium in January 2026, using a new Rust-based decoder (jxl-rs) rather than the original C++ libjxl. As of April 2026, this support is available in Chrome 145 but disabled by default, requiring the chrome://flags/#enable-jxl-image-format experimental flag to be enabled. Firefox has JPEG XL in Nightly builds. Neither has shipped it as a default-enabled feature to end users.
The practical jpeg xl browser support picture for 2026: Safari 17+ supports it (approximately 17% of global traffic). Chrome has the code but not yet enabled by default. Firefox is in progress. Global default-on coverage for JPEG XL sits around 12% of browser market share, compared to AVIF's 93-94%.
This single fact makes AVIF the only production-ready choice today for teams that cannot control their audience's browser version.
Encode and Decode Speed
Speed matters in two different ways: encode time (how long it takes to compress an image) and decode time (how long the browser takes to display it).
Encode speed: AVIF is computationally expensive to encode. At equivalent quality settings, AVIF encoding takes significantly longer than WebP, and JPEG XL is also slower than WebP but generally faster than AVIF at comparable quality targets. For manual pre-upload conversion workflows, neither difference is practically significant. For automated build pipelines processing hundreds of images at deployment time, AVIF encode time can become a real constraint. Tools like the MeloTools image converter run conversion in-browser using native codecs, which avoids server-side encoding cost entirely and keeps files private.
Decode speed: JPEG XL has a measurable advantage here. JXL supports progressive decoding natively, meaning a browser can display a lower-quality version of an image while the rest loads, then refine it. This is exactly how classic JPEG interlacing worked and is a capability AVIF does not currently offer. For large hero images and high-resolution photography, progressive decoding meaningfully improves perceived load speed even before the full image has transferred. AVIF decode speed is fast but not progressive.
Feature Comparison: What Each Format Offers
Beyond compression and browser support, the two formats differ in several ways that matter for specific use cases.
| Feature | JPEG XL | AVIF |
|---|---|---|
| Lossy compression | Excellent | Excellent |
| Lossless compression | Excellent | Poor (files too large) |
| HDR and wide colour gamut | Supported (10/12-bit) | Supported (10/12-bit) |
| Progressive decoding | Yes (native) | No |
| Animation | Yes (limited browser support) | Yes |
| JPEG lossless recompression | Yes (unique capability) | No |
| Alpha transparency | Yes | Yes |
| Browser support (default-on) | ~12% | ~93% |
| Encode speed vs AVIF | Faster | Baseline |
| Toolchain support | Limited | Good |
The JPEG lossless recompression capability deserves special attention. If your workflow involves JPEG archives, product photography shot as JPEG, or any existing JPEG library, JXL can transcode those files to smaller sizes without any quality loss and reconstruct the original JPEG byte-for-byte from the JXL container. No other format can do this. For publishers and media organisations with large JPEG archives, this capability alone makes JXL worth monitoring closely.
Which Format Should You Use in 2026?
The answer depends on your audience, your workflow, and how much complexity you are willing to manage.
Use AVIF now if: you need maximum compression for photographic content, your audience uses modern browsers across Chrome, Firefox, and Safari, and your priority is production deployment with measurable performance gains today. Serve AVIF with a WebP fallback using the <picture> element and you cover virtually all modern traffic.
<picture>
<source srcset="image.avif" type="image/avif">
<source srcset="image.webp" type="image/webp">
<img src="image.jpg" alt="Description" width="800" height="600">
</picture>
Monitor JPEG XL if: you work with large JPEG archives and want lossless recompression, your content involves a high proportion of illustrations and synthetic graphics where JXL lossless excels, your audience is heavily Safari-weighted (where JXL is already supported), or you are building a forward-looking image delivery stack and want to include JXL as soon as Chrome enables it by default. Converting images to AVIF today using the MeloTools AVIF converter while watching for Chrome default support is a practical approach.
Add JPEG XL to your picture stack once Chrome enables it by default. The format is technically excellent. The browser support situation is a timing problem, not a quality problem.
The Practical Stack for 2026
For most web projects today, the recommended image delivery approach is:
- Convert images to AVIF for primary delivery
- Maintain a WebP fallback for browsers without AVIF support
- Keep JPEG as the final fallback for maximum compatibility
- Add JPEG XL as the leading source in your
<picture>element once Chrome default-enables it
You can convert JPEG and PNG images to AVIF and WebP directly in your browser using MeloTools' image conversion tools with no file uploads and no server processing. For teams evaluating both formats, running both conversions side by side and comparing output visually at your specific quality target is more reliable than relying on benchmark numbers alone, since both formats' quality scales behave differently.
For a deeper look at AVIF's compression characteristics and how it compares to WebP in production, the AVIF vs WebP guide covers the format comparison in full. For understanding how format choices interact with Core Web Vitals and Lighthouse scores, the image optimization for developers guide covers the full pipeline.
FAQ: JPEG XL vs AVIF
Is JPEG XL better than AVIF? JPEG XL has technical advantages in lossless compression, progressive decoding, and JPEG recompression. AVIF has better lossy compression for photography at mid-quality targets and dramatically better browser support. Neither is universally better: AVIF is the production-ready choice today, and JPEG XL is the technically richer format worth deploying once Chrome enables it by default.
Does Chrome support JPEG XL in 2026?
Chrome merged JPEG XL decoding support in January 2026 using a Rust-based decoder in Chrome 145. As of April 2026, it is available but disabled by default and requires enabling via chrome://flags/#enable-jxl-image-format. It has not yet shipped as a default-on feature to end users.
What is the current JPEG XL browser support percentage? Approximately 12% of global browser market share supports JPEG XL by default, primarily Safari 17 and later. AVIF is supported by approximately 93-94% of global browser traffic.
Can I use JPEG XL and AVIF together?
Yes. The <picture> element allows you to specify multiple sources in priority order. Once JXL has sufficient browser support, the optimal stack will be JXL first, AVIF second, WebP third, JPEG final fallback, serving each browser the best format it supports.
Which format is better for lossless images? JPEG XL is significantly better for lossless compression. Lossless AVIF produces files that are not meaningfully smaller than PNG, making it impractical for web delivery. Lossless JXL produces substantially smaller files and is a genuine replacement for PNG in lossless workflows.
Will JPEG XL replace AVIF? The two formats are more complementary than competing. AVIF is likely to remain the dominant format for lossy photography delivery due to its established browser support advantage. JPEG XL's lossless capabilities, progressive decoding, and JPEG recompression make it more suited to archival, publishing, and high-quality delivery use cases. Both will likely coexist in a mature image delivery stack.
How do I convert images to AVIF or JPEG XL? You can convert JPEG and PNG files to AVIF directly in your browser using MeloTools' image converter with no uploads required. JPEG XL conversion tooling is available through libjxl and several desktop applications, with browser-based JXL conversion becoming available as browser support matures.