JPEG XL vs AVIF
These are the two serious candidates to replace JPEG, and the argument between them has been running for years. The short version: AVIF has the wider browser support, JPEG XL has the engineering — though the support gap narrowed sharply in October 2026, when Chrome and Firefox switched JPEG XL on by default. Which matters more depends entirely on what you're doing with the file.
by Robert Castillo · Published · updated
Where they came from, and why it matters
AVIF is a still image pulled out of a video codec. It uses AV1, developed by the Alliance for Open Media — Google, Netflix, Amazon, Mozilla and others — to escape the patent fees on video. Being a video frame is its greatest strength and its most persistent weakness.
JPEG XL was designed from scratch as a still image format, by the people who had spent careers on still images. It merged Google's PIK with Cloudinary's FUIF and became ISO/IEC 18181. Nothing in it is inherited from video, which shows up in ways that matter once you look past the raw compression numbers.
That origin story explains most of the differences below. AVIF got browser support quickly because browsers already had an AV1 decoder for video. JPEG XL got better still-image behaviour because that was the only thing it was ever asked to do.
The comparison, honestly
| AVIF | JPEG XL | |
|---|---|---|
| Browser support today | Excellent — Chrome, Firefox, Safari | Chrome 155+, Firefox 158+, Safari 17+; not Edge |
| Compression at low quality | Usually better | Good |
| Compression at high quality | Good | Usually better |
| True lossless | Supported but inefficient | Excellent |
| Encoding speed | Slow | Much faster |
| Progressive loading | No | Yes |
| Re-packs existing JPEGs losslessly | No | Yes, ~20% smaller |
| Very large images | Limited by tiling | Up to a billion pixels per side |
| Animation | Yes | Yes |
| HDR / wide gamut | Yes | Yes |
Read that table twice and a pattern appears. AVIF wins the rows about getting an image onto a web page today. JPEG XL wins nearly everything about the image itself. Neither is a knockout, and anyone who tells you otherwise is selling something.
The four differences that actually change your decision
Support is closer, not equal
AVIF renders in Chrome, Firefox, Safari and Edge. JPEG XL is now on by default in Chrome 155 (since 6 October 2026), Firefox 158 (since 13 October 2026) and Safari 17, but Edge still doesn't show it, and nor does any browser that hasn't been updated. For anything a stranger will open in a browser, that gap still matters: JPEG XL on a public page needs a fallback behind it.
Only JPEG XL re-packs JPEGs
Feed it an existing JPEG and it stores the same data about 20% smaller, reversibly, byte for byte. For anyone with a large legacy library this is free disk space with zero risk. AVIF has no equivalent — it must re-encode, which loses quality.
Encoding speed is not a footnote
AVIF encoding is slow enough to be a genuine operational cost at scale. JPEG XL is several times faster. If you're processing a hundred thousand images, this is the difference between an afternoon and a weekend.
They fail differently
Squeezed hard, AVIF smooths detail away — skin and foliage turn waxy, and the image looks clean but subtly wrong. JPEG XL holds texture longer and degrades more like film grain. Which you prefer is genuinely a matter of taste.
So which one do you use?
Images on a public website → AVIF
It works in every major browser today, with a JPEG fallback for the rest. Nothing else about the comparison matters if the picture doesn't render.
Your own photo archive → JPEG XL
Better at high quality, genuinely good at lossless, and the JPEG re-packing gives you a fifth of your disk back for nothing. You control what opens these files, so compatibility stops being an argument. How to do it properly →
Sending a file to another person → neither
Send a JPEG. Both of these will confuse someone eventually, and the recipient's confusion is your problem. If you're the one who received the odd file, the viewer opens it.
Serving both → use the picture element
A <picture> element can offer AVIF, JPEG XL and JPEG at once, letting each browser take the best it understands. More work, but it's the only answer that doesn't compromise — and since October 2026 the JPEG XL source is picked up by Chrome and Firefox as well as Safari.
Will JPEG XL ever win?
It's the question underneath every version of this comparison, and the honest answer is that nobody knows. Chrome removed JPEG XL support in 2023 citing insufficient ecosystem interest, a decision that was unpopular enough to generate its own small genre of angry blog posts.
Since then the picture has reversed. Apple shipped support across its platforms. Chrome brought JPEG XL back behind a flag in Chrome 145 (10 February 2026), using jxl-rs, a decoder written in memory-safe Rust, and switched it on by default in Chrome 155 on 6 October 2026. Firefox 158 followed on 13 October 2026, with the same decoder. And the format keeps gaining ground in professional and archival workflows where nobody has to ask a browser's permission.
What that means practically is that JPEG XL is a safe choice for storage and, on the public web, a good one only with a fallback behind it, because Edge and browsers that haven't been updated still can't show it — which is exactly what the table above says. If your interest is the web specifically, the Chrome situation is worth understanding in detail, and you can test your own browser in a few seconds.