AVIF vs HEIC: Two Containers, Two Different Codecs
Both use the same MP4-style box structure and both are called "modern formats" — but they are not interchangeable.
The Core Difference: Same Box, Different Codec
AVIF and HEIC share the same container format — ISOBMFF, the same box structure used by MP4 video files. This is why they look structurally similar when you examine their hex headers, and why some tools can open the container without decoding the image. But the codec inside — the algorithm that actually compressed the pixel data — is completely different for each format.
HEIC stores images encoded with HEVC, also known as H.265, the video codec developed by the Joint Collaborative Team on Video Coding. AVIF stores images encoded with AV1, the open video codec developed by the Alliance for Open Media. These two codecs use different prediction models, different transform sizes, different entropy coding, and different loop filters. A decoder for one cannot read the other, even though the outer container looks the same. This is exactly why renaming a .heic file to .avif does nothing useful — the inner bitstream is still HEVC, and any AVIF decoder will reject it immediately.
The container format is ISOBMFF in both cases, defined under ISO/IEC 14496-12. HEIC further specifies the HEIF (High Efficiency Image File Format) profile from ISO/IEC 23008-12, using HEVC as its codec. AVIF specifies the AV1 Image File Format profile, using AV1 intra-frame encoding. If you want to understand why a tool reads one but not the other, the answer is almost always the codec, not the container.
Where Each Format Comes From
HEIC has its origins in the mobile photography world. Apple adopted HEIC as the default capture format on iPhone starting with iOS 11 in 2017. When you take a photo on an iPhone with default settings, the device saves it as a .heic file. The format was chosen because HEVC delivers roughly half the file size of JPEG at equivalent quality, making it practical for high-resolution photos stored on limited device storage. Before HEIC became widely visible to consumers, it was known primarily as HEIF — the container standard — with HEVC as the assumed codec.
AVIF came from a different direction. The Alliance for Open Media — whose founding members include Google, Mozilla, Microsoft, Amazon, Netflix, and others — created AV1 primarily as a royalty-free video codec to replace VP9. In 2019, the Alliance published the AVIF specification, defining how AV1 intra-frame encoding could be used to store still images inside an ISOBMFF container. The motivation was explicit: provide the compression benefits of modern codecs without the patent licensing uncertainty that surrounds HEVC.
The practical result is that HEIC is dominant in device storage — particularly Apple devices — while AVIF is dominant on the web, where royalty-free licensing matters for browser vendors and content platforms. Understanding where each format came from explains most of the compatibility differences you encounter in practice.
Licensing: Royalty-Free vs Patent Pool
AV1 is royalty-free. The Alliance for Open Media designed it this way from the start, and members pledged their relevant patents to a pool that any implementer can use without paying per-device or per-stream fees. This is why browser vendors adopted AVIF quickly and without hesitation — there is no licensing negotiation needed to ship a decoder in Chrome, Firefox, or Safari.
HEVC operates under a different model. Multiple patent pool administrators — MPEG LA, HEVC Advance, and Velos Media — each hold patents on parts of the HEVC specification, and their licensing terms differ. Hardware manufacturers, OS vendors, and browser makers must navigate these pools to ship HEVC support legally. This contributed to Chrome and Firefox not supporting HEIC natively on most platforms for years. Apple, which both holds HEVC patents and pays for a comprehensive license for its own platforms, can afford native HEIC support across macOS and iOS. Most other platforms cannot afford or do not want to take on that licensing complexity for a still-image format when AVIF provides similar quality for free.
For individual users this distinction is mostly invisible — you do not negotiate licenses when opening photos. But for developers building web apps, server-side image pipelines, or cross-platform tools, the royalty-free nature of AV1/AVIF removes a real barrier. Open-source libraries like libavif and dav1d can be distributed freely; HEVC libraries ship with licensing constraints that vary by jurisdiction.
Browser Support: AVIF Wins Clearly
AVIF has broad browser support across all major engines. Chrome added AVIF decoding in version 85. Firefox enabled it by default in version 93. Safari added AVIF support in version 16.1, covering iOS 16 and macOS Ventura. Edge follows Chromium's timeline. This means any modern browser on any platform — Windows, macOS, Linux, Android, iOS — can render AVIF images without plugins.
HEIC has essentially no cross-browser support outside of Safari on Apple platforms. Chrome does not decode HEIC on Windows, macOS, Linux, or Android in any shipping version as of the time of writing. Firefox does not support HEIC. Edge does not support HEIC. The only mainstream browser that reliably opens HEIC is Safari on Apple operating systems, which makes sense given Apple's ownership of the format as a device standard. Serving HEIC on a public website would break the image for the majority of visitors.
The consequence for web publishing is straightforward: AVIF is the modern format to use on websites. If you receive HEIC files from an iPhone and need to publish them online, you must convert to AVIF, JPG, or WebP first. You can use a browser-based AVIF converter or a dedicated HEIC-to-JPG tool. Attempting to embed a .heic file directly in an <img> tag will produce a broken image for most of your audience.
Image Quality and Feature Parity
Both formats deliver substantially better compression than JPEG at equivalent perceptual quality. Both support 8-bit, 10-bit, and higher color depths. Both support alpha transparency with a separate alpha plane. Both support HDR content, including PQ (Perceptual Quantizer, used in HDR10) and HLG (Hybrid Log-Gamma, used in broadcast HDR) transfer functions. On these dimensions, AVIF and HEIC are genuine peers — the underlying codecs, AV1 and HEVC, were both designed for high-quality modern imaging.
Where they differ in practice is encoder maturity and tooling availability. HEVC encoders have been commercially deployed and tuned for years across a large hardware ecosystem — dedicated HEVC encode/decode chips are present in virtually every modern smartphone and many cameras. AV1 encoding is computationally heavier in software, though hardware AV1 encoders are now present in recent Apple Silicon chips, Intel Arc GPUs, and AMD RDNA3 GPUs. For still image encoding — where you encode once and decode many times — the encode speed difference matters less than for video.
At matched compression ratios on typical photographic content, the quality difference between AVIF and HEIC is not significant for most use cases. Both outperform JPEG noticeably. If you are working within the Apple ecosystem for photo storage and management, HEIC is perfectly reasonable. If you are targeting the web or cross-platform delivery, AVIF is the better choice for the reasons already covered.
Transparency and HDR: Both Support Them, Differently
AVIF stores the alpha (transparency) channel as a separate auxiliary image item inside the ISOBMFF container, encoded with AV1. This means the alpha can be compressed losslessly independently of the color data. A product photo with a transparent background can have its color layers compressed aggressively at CQ 30 while the alpha mask stays crisp. The same pattern applies to HEIC, which stores alpha as a separate HEVC-encoded auxiliary image. Both approaches are more efficient than PNG's interlaced alpha channel for photographic content with transparency.
HDR support works similarly in both formats. The container carries color profile metadata — including the transfer function (PQ or HLG), color primaries (BT.2020 for wide gamut), and mastering display luminance. A device that understands the metadata can tone-map the HDR content appropriately; a device that does not will fall back to SDR rendering. Both AVIF and HEIC handle this through standard ISOBMFF metadata boxes, so the approach is structurally identical even though the codec is different.
For comparison: JPEG supports neither transparency nor HDR. PNG supports transparency but not HDR. WebP supports transparency and has limited HDR capability. AVIF and HEIC are the only two mainstream formats that handle both transparency and HDR together in a single file — which is why they are both considered the formats of choice for professional photography and high-end content delivery.
Platform and App Compatibility
HEIC is native to Apple platforms. macOS Preview has read and written HEIC since macOS High Sierra. iOS displays HEIC photos in the Photos app without any conversion. Airdrop and iMessage pass HEIC files between Apple devices without alteration. When you email a HEIC photo from an iPhone to another iPhone via Apple Mail, it arrives as HEIC. Outside Apple, HEIC support is thinner: Windows 11 can display HEIC thumbnails in Explorer with the HEVC Video Extensions installed from the Microsoft Store, but the extension requires a one-time purchase on some Windows versions.
AVIF support has grown significantly across platforms. Windows 11 displays AVIF thumbnails natively. macOS Ventura and later read AVIF in Preview. Android displays AVIF in the gallery on recent versions. Adobe Photoshop has read AVIF natively since version 23.2. Lightroom Classic can import AVIF but export support has lagged behind. For command-line workflows, libavif, ffmpeg, ImageMagick, and Squoosh all handle AVIF with no licensing issues.
The practical summary:
- Apple devices (iPhone, Mac): both HEIC and AVIF work natively.
- Windows: AVIF works natively; HEIC requires an extension install.
- Android: AVIF works on recent versions; HEIC support is limited.
- Web browsers: AVIF works everywhere modern; HEIC works only in Safari.
- Email clients: neither format renders reliably — convert to JPG before attaching.
How to Convert Between These Formats
Converting HEIC to AVIF or to JPG is a common need when moving photos from an iPhone to the web. Apple makes this slightly easier than it looks: when you drag a .heic file out of the Photos app on macOS into a folder, macOS automatically converts it to JPEG if the destination app does not support HEIC. Similarly, when sharing via AirDrop to a non-Apple device, iOS offers to convert automatically.
For manual conversion on macOS, the Preview app can open a .heic file and export it as JPEG or PNG through File > Export. For batch conversion on macOS, sips is a built-in command-line tool:
sips -s format jpeg input.heic --out output.jpgTo convert AVIF to JPG on any platform, the AVIF to JPG converter on this site runs entirely in your browser — no upload, no server, no installation. It uses a WebAssembly build of libavif with the dav1d decoder. For command-line users, ffmpeg handles both directions:
# HEIC to JPG
ffmpeg -i input.heic -q:v 2 output.jpg
# AVIF to JPG
ffmpeg -i input.avif -q:v 2 output.jpgRemember that both HEIC and AVIF are compressed formats. Converting from either to JPG is a lossy step — you are adding a second round of lossy compression on top of the first. Keep the original HEIC or AVIF file if you need to re-export later, and generate JPG derivatives from those originals rather than re-compressing an already-compressed JPG.
Which Format Should You Use?
The answer depends on where the image is going, not on which format is technically superior. For device storage on Apple hardware — keeping photos on your iPhone, backing up to iCloud, editing on a Mac — HEIC is fine. Apple's ecosystem handles it natively and the storage efficiency is real. You do not need to convert HEIC to AVIF just to keep it on your own devices.
For web publishing, choose AVIF. Browser support is broad, encoding tools are freely available and require no licensing, and the compression quality is equivalent to HEIC. Use the HTML <picture> element with an AVIF source and a JPG fallback to cover older browsers. If you are unsure how to open AVIF files or work with them in your existing tools, the compatibility situation has improved substantially in the past two years.
For cross-platform sharing — sending photos to colleagues on Windows or Android, attaching to emails, submitting to stock libraries — convert to JPG first. Neither HEIC nor AVIF has the universal support that JPEG has accumulated over thirty years. A JPG file opens everywhere without question. You can convert AVIF to JPG online instantly without installing anything. For HEIC, macOS Preview or the built-in iOS share sheet will do the same job.
If you need transparency for product cutouts, logos, or compositing work, both AVIF and HEIC handle it — but AVIF is the better choice for web delivery because of browser support. Compare AVIF to PNG conversion as an alternative when you need lossless transparency with broad compatibility.
Frequently Asked Questions
▸Can I just rename a .heic file to .avif to convert it?
No. Renaming the file extension does not change the codec inside the container. A .heic file contains HEVC-encoded image data. An AVIF decoder expects AV1-encoded data. When you rename the file, any AVIF decoder will read the container header, find HEVC bitstream instead of AV1 bitstream, and either reject the file or produce garbage output. To actually convert HEIC to AVIF you must re-encode the pixel data from scratch using a tool that decodes HEVC and encodes to AV1. On macOS, ImageMagick with libavif compiled in can do this. The same is true in reverse: a .avif file renamed to .heic will not open in HEIC-only viewers.
▸Why does Chrome not support HEIC while Safari does?
The primary reason is patent licensing. HEVC — the codec inside HEIC — is covered by multiple patent pools with different licensing terms. Apple holds HEVC patents and has negotiated comprehensive licenses for its own platforms, so shipping HEIC support in Safari costs Apple very little incrementally. Google would need to license HEVC separately to ship HEIC decoding in Chrome, and the licensing complexity and cost across the multiple patent pools has meant Chrome has not done this for a still-image format. AV1, the codec inside AVIF, is royalty-free, which is why Chrome, Firefox, and Edge all added AVIF support without licensing barriers.
▸Is AVIF better quality than HEIC at the same file size?
In most cases they are comparable, with both significantly outperforming JPEG. Both codecs use modern prediction techniques, large transform blocks, and sophisticated entropy coding. The quality difference between AVIF and HEIC at matched file sizes tends to be small enough that it is not meaningful for most photographic content. What matters more in practice is encoder quality and settings than which codec you choose. A well-tuned AVIF encoder and a well-tuned HEVC encoder will produce similar results. For web use, AVIF wins on compatibility, not on compression efficiency.
▸Do both AVIF and HEIC support transparency?
Yes. Both formats support alpha transparency by storing the alpha channel as a separate auxiliary image inside the ISOBMFF container. Both can encode the alpha losslessly even when the color data is lossy-compressed. This makes both formats useful for product photography cutouts, logos, and compositing. However, for web use, AVIF is the practical choice because HEIC with transparency has no meaningful browser support outside of Safari. On Apple devices, both work natively.
▸How do I convert HEIC photos from my iPhone to use on a website?
The simplest path is to convert HEIC to JPEG first, then optionally re-encode to AVIF if you want modern web optimization. On macOS, open the HEIC file in Preview and use File > Export to save as JPEG. On Windows, install the HEVC Video Extensions from the Microsoft Store, then use the Photos app to export. For batch conversion on macOS, the sips command-line tool handles it without any additional software. Once you have a JPEG, you can use this site to convert AVIF files or keep the JPEG for maximum compatibility.
▸Can HEIC files contain multiple images, like a burst shot?
Yes. HEIC, like AVIF, is based on ISOBMFF, which supports multiple image items in a single file. iPhones use this for Live Photos (which store a still image and a short video together), burst shots, and portrait depth maps. A single .heic file from an iPhone can contain the main photo, a depth map used for portrait mode, and a thumbnail, all in one file. AVIF also supports image sequences and auxiliary images in a single container, though the use cases are different — AVIF sequences are used for animation rather than burst capture.
▸Does Windows support AVIF and HEIC natively?
Windows 11 supports AVIF natively — thumbnails appear in File Explorer and the Photos app opens AVIF files without any additional installation. For HEIC on Windows 11, you may need to install the HEVC Video Extensions from the Microsoft Store; on some Windows editions this is free, on others it requires a small payment. Windows 10 support for both formats is more limited. If you are working on Windows and receive HEIC files regularly, converting them to AVIF or JPEG on receipt is a practical workflow to avoid compatibility issues.
▸Is it safe to delete the original HEIC after converting to JPG?
Only if you are confident you will not need to re-export at higher quality or with different settings. Both HEIC and JPG are lossy formats. When you convert HEIC to JPG you are re-encoding already-compressed data, which adds a second round of lossy compression. The JPG copy contains less information than the HEIC original. If you later want a higher-quality JPG, a different crop, or a different color profile, you cannot recover what was lost in the HEIC-to-JPG step. Keep the original HEIC — or the original camera RAW if you have it — as your archival master and treat the JPG as a distribution copy.