HEIC is the still-image format your iPhone has saved photos in by default since 2017, yet it cannot be displayed by most web browsers. It packs a photograph into roughly half the bytes of a JPEG, but it wraps the patent-encumbered HEVC (H.265) codec, so Chrome, Firefox, and Edge refuse to decode it. That single fact splits HEIC and AVIF into two jobs: HEIC captures and stores on Apple devices, while AVIF delivers the same picture to the open web. This page explains where HEIC came from, why it never reached the browser, and the exact step that turns an iPhone photo into a web-ready file.
What HEIC actually is
HEIC is Apple's brand name for an HEVC-coded image stored in an HEIF container. Three layers stack to form the file:
- HEIF is the container specification, published by MPEG in 2015 as ISO/IEC 23008-12.
- HEVC (H.265) is the video codec whose intra-coded keyframe holds the actual pixels.
- ISOBMFF is the box structure HEIF inherits, shared with MP4 and AVIF.
The .heic extension and image/heic MIME type signal HEVC-coded content specifically. A generic HEIF file using a different codec carries the .heif extension instead. Apple's image format documentation describes the HEIF and HEVC image pipeline on Apple platforms.
Why Apple shipped HEIC on every iPhone
Apple adopted HEIC to halve photo storage without losing quality or features. The format became the iPhone default in iOS 11, released September 2017, on every device with the A10 Fusion chip or newer, starting with the iPhone 7.
The motivation was concrete and measurable:
- Storage. A 12-megapixel HEIC photo occupies 1–3 MB, against 4–6 MB for the equivalent JPEG.
- Capture speed. A dedicated hardware HEVC encoder writes HEIC in real time at low power, so burst shooting stays instant.
- Feature headroom. HEIC carries data JPEG cannot, which Apple needed for computational photography.
Because iCloud Photo Library syncs HEIC across devices, this format is now one of the most-captured image formats on Earth. It is rarely the format anyone publishes, however.
The features HEIC carries that JPEG cannot
HEIC stores a richer image than JPEG, matching most of what AVIF offers. Four capabilities matter most:
- 10-bit and 12-bit colour — finer tonal gradients and far less banding than 8-bit JPEG.
- HDR transfer functions — PQ and HLG with BT.2020 and Display P3 wide gamut.
- Alpha transparency — a full auxiliary alpha plane, unlike JPEG's none.
- Multiple items per file — Live Photos store a still, a short video, and depth maps in one container.
These features come straight from HEVC's video lineage, the same way AVIF inherits them from AV1. The catch is reach: HDR in a HEIC file stays locked inside Apple's apps until you transcode it to a web format.
Why HEIC will not open in a browser
The blocker is patents, not technology. HEVC, the codec inside every HEIC file, is licensed through three separate patent pools, so non-Apple browser vendors refuse to ship a decoder. The three pools are MPEG LA, Access Advance (formerly HEVC Advance), and Velos Media, each with its own licensors and royalty terms.
The consequences are direct:
- Per-device royalties. A browser bundling an HEVC decoder would owe per-unit royalties across overlapping pools, with no way to recoup them.
- Open-source incompatibility. Chromium and Firefox cannot ship royalty-bearing code in a free, redistributable browser.
- No business case. Vendors co-founded the Alliance for Open Media in 2015 to build a royalty-free successor, so adding HEVC was never on their roadmap.
The fragmented pool structure is documented in the Streaming Learning Center analysis of HEVC licensing. Apple absorbs the royalty into hardware margins, which is why HEIC is free to the iPhone owner but not to a browser maker.
Browser support: Safari only, and only via the OS
For the web, treat HEIC as undisplayable. Only Safari renders HEIC in an <img> tag, and it does so by calling the macOS or iOS system decoder rather than its own engine. Every other browser shows a broken image.
| Browser | HEIC in <img> | Mechanism |
|---|---|---|
| Safari (17+, macOS/iOS) | Yes | Operating-system HEVC decoder |
| Chrome / Edge | No | Does not call the OS decoder, even on macOS |
| Firefox | No | No HEVC decoder; not on the roadmap |
| Android Chrome / Samsung Internet | No | No support |
Because Safari's support rides the Apple OS decoder, it is not portable: the same .heic URL fails the moment a visitor opens it in Chrome. Current detail is tracked at caniuse: HEIF/HEIC, and the practical limits are summarised in HEICcon's guide to why you can't use HEIC on websites. By contrast, AVIF reaches about 94% of browsers, Safari included.
How HEIC compares to AVIF on compression
On file size the two formats are close, because their underlying codecs are peers. AV1 (inside AVIF) and HEVC (inside HEIC) both reach roughly half a JPEG's size at matched quality on a typical photograph.
The small differences are content-dependent:
- AV1's wider transform set can edge ahead on gradients and synthetic graphics.
- HEVC's mature intra prediction holds parity on ordinary camera photos.
- At near-lossless quality both converge and the gap disappears.
Compression is effectively a tie, so the decision is driven by reach and licensing — where AVIF wins outright. The full breakdown lives in AVIF vs HEIC.
Capture versus delivery: the correct workflow
HEIC and AVIF rarely compete, because they sit at opposite ends of the pipeline. HEIC is a capture-and-storage format; AVIF is a delivery format. The right pattern accepts HEIC as input and emits AVIF as output.
A user-upload pipeline runs in three steps:
- A visitor uploads a
.heicfile, common straight from an iPhone. - The server transcodes it with
libheifor Sharp, baking in EXIF orientation. - The site serves AVIF to capable browsers, with JPG or WebP fallbacks.
import sharp from "sharp";
// Transcode an iPhone HEIC upload to web-ready AVIF
await sharp("upload.heic")
.rotate() // apply EXIF orientation before re-encoding
.avif({ quality: 50, effort: 4 })
.toFile("output.avif");
The .rotate() call is load-bearing: iPhones record orientation in EXIF instead of rotating pixels, so the encoder must apply it or the result lands sideways. Tuning quality and effort is covered in AVIF Optimization, and the page-speed payoff in Core Web Vitals for Images.
FAQ
Why won't HEIC open in my browser?
Because the codec inside it, HEVC, is patent-licensed through three pools, and Chrome, Firefox, and Edge will not ship a royalty-bearing decoder. Only Safari opens HEIC, using the operating system's decoder rather than its own. For anything destined for the web, convert the file to AVIF or JPG first.
Should I convert iPhone HEIC for the web?
Yes. Convert HEIC to AVIF for any image headed to a web page, because HEIC stays broken for most visitors while AVIF reaches roughly 94% of them. Keep the original HEIC in iCloud or Photos if you like; convert a copy for delivery.
Is HEIC or AVIF better quality?
They are effectively tied on compression, since AV1 and HEVC are codec peers. Choose AVIF for the web on browser support and licensing, not file size. Reserve HEIC for on-device capture and storage inside the Apple ecosystem.
Convert your images
There is no in-browser HEIC converter here, because HEIC decoding needs Apple's licensed decoder. Once a photo is already in AVIF, JPG, or PNG, these converters run entirely in your browser — the image never leaves your device:
- Convert JPG to AVIF, Convert PNG to AVIF — produce web-ready AVIF
- Convert AVIF to JPG, Convert AVIF to PNG — convert AVIF back for editing or sharing
Sources and further reading
- caniuse: HEIF/HEIC support tables
- HEICcon: Why You Can't Use HEIC on Websites
- Streaming Learning Center: HEVC licensing
- Apple Developer: writing HEIF/HEVC images
- AVIF Format — the royalty-free format that delivers HEIC's features to the web
- AVIF vs HEIC — the full head-to-head comparison