Learn / Image Formats

AVIF vs. HEIC vs. JPEG XL

Three modern successors to JPEG, all smaller and better in principle — and none of them universally supported yet. Here's what actually differs.

JPEG is decades old, and every major image codec released since has beaten it on compression efficiency, quality, or both. Three of the current contenders — AVIF, HEIC, and JPEG XL — get mentioned constantly, often interchangeably, as if they're competing for the same job. They're not quite. Each made different trade-offs, and those trade-offs are why none of them has simply replaced JPEG outright yet.

AVIF

Built on the AV1 video codec, AVIF is open and royalty-free, and it has by far the widest real browser support of the three — Chrome, Firefox, and Safari all ship decoders today. It compresses meaningfully better than JPEG at equivalent visual quality, supports transparency (unlike JPEG), and can carry HDR data natively via PQ or HLG transfer functions baked into the pixel format itself — a fundamentally different approach from the gain-map technique this site's tools use.

HEIC

Apple's default photo capture format since iOS 11, built on HEVC (H.265) compression. It compresses well and supports features like image sequences and depth data, but two things hold it back outside Apple's ecosystem: HEVC is patent-encumbered, meaning royalties are owed to decode or encode it in software, and as a direct result, browser and cross-platform support is genuinely inconsistent. Plenty of websites and apps still reject HEIC uploads outright rather than deal with the licensing and decoding overhead.

JPEG XL

Technically the most impressive of the three on paper — it can losslessly recompress an existing JPEG to a meaningfully smaller file with zero further quality loss (a genuinely unusual capability), supports very high bit depths, and handles both photographic and graphic content well. Its problem isn't the format; it's support. Browser backing has been the weakest of the three — Chrome shipped, then removed, experimental support — which means real-world availability lags well behind AVIF's despite JPEG XL's technical advantages.

"Better compression" on a spec sheet doesn't help if the browser or platform on the other end can't decode the file. Before committing to any of these three for something that has to display reliably, check real decode support rather than trusting a format comparison chart — Headroom's Compatibility Checker runs a genuine live decode test in your current browser, not a lookup table.

The practical takeaway

AVIF is the safest bet today for anything that needs to display broadly on the web. HEIC is fine as a capture format if everything downstream is Apple hardware, but a liability the moment it needs to leave that ecosystem. JPEG XL is genuinely promising and worth revisiting as support improves, but isn't yet something to depend on for content that has to just work everywhere. See also JPEG vs. PNG vs. WebP for how these newer formats compare against the previous generation, not just each other.

Questions people actually ask

Which of these should I actually use today?
AVIF, for anything web-facing — it has the broadest real browser support of the three by a wide margin, and Headroom's Compatibility Checker can confirm exactly what your own browser decodes rather than asking you to guess. HEIC makes sense as a capture format if you're staying inside Apple's ecosystem, but it's a poor choice for sharing broadly. JPEG XL is worth watching, not relying on, until support catches up.
Does Headroom support HDR AVIF?
For encoding, no — native HDR AVIF encoding isn't exposed by any browser today, which we verified directly rather than assumed. That's exactly why Encode builds gain-map JPEGs instead: it's the HDR output format that actually works end to end, entirely in the browser, right now.
Can Convert turn my HEIC photos into something more widely usable?
Only if your browser can decode HEIC in the first place — support is inconsistent, particularly outside Safari. Check the Compatibility Checker before assuming; if your browser can open the file, Convert can re-encode it to JPEG, PNG, WebP, or AVIF.