⚖️ Head to head

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

🌐 AVIF wins support⚡ JXL wins speed🔁 JXL re-packs JPEGs🎯 Different jobs

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

AVIFJPEG XL
Browser support todayExcellent — Chrome, Firefox, SafariChrome 155+, Firefox 158+, Safari 17+; not Edge
Compression at low qualityUsually betterGood
Compression at high qualityGoodUsually better
True losslessSupported but inefficientExcellent
Encoding speedSlowMuch faster
Progressive loadingNoYes
Re-packs existing JPEGs losslesslyNoYes, ~20% smaller
Very large imagesLimited by tilingUp to a billion pixels per side
AnimationYesYes
HDR / wide gamutYesYes

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.

FAQ

Which produces smaller files, AVIF or JPEG XL?
It depends on how hard you compress. At aggressive settings — small thumbnails, low-quality web images — AVIF usually wins. At the high quality settings you'd use for photographs you care about, JPEG XL usually wins. The gap in both directions is smaller than either camp claims.
Is AVIF lossless any good?
Not particularly. AVIF supports lossless but wasn't designed around it, and the results are often larger than PNG. JPEG XL's lossless mode is genuinely strong, which is why archival workflows favour it.
Can I convert AVIF to JPEG XL directly?
You can, but think about what happens: AVIF is lossy, so decoding and re-encoding costs a second generation of quality. If you still have the original, convert from that instead. Converting from an already-lossy file should be a last resort.
Which one does Google use?
Both, in different places, which tells you something. Google co-developed AV1 behind AVIF and serves it widely, while JPEG XL grew out of Google Research's PIK project. The removal from Chrome in 2023 was a product decision about browser scope, not a verdict on the technology — and Chrome 155 brought it back, on by default, in October 2026.
Should I convert my whole library to AVIF?
Probably not. For archiving you want lossless or near-lossless, which is JPEG XL's strength and AVIF's weakness — and the JPEG re-packing trick means you can convert without any quality loss at all, which AVIF simply cannot offer.