What HEIC actually is, and how we convert it in your browser
Apple's HEIC format is smaller and better-quality than JPEG — and a hassle if you don't have an Apple device. Here's how we decode it locally.
If you've ever AirDropped a photo from an iPhone to a Windows or Linux machine, you've probably hit this: the file is .heic, and your image viewer shrugs. Here's what's going on, why HEIC exists, and how we decode it without sending your photos anywhere.
HEIC is a container; HEVC is the codec
HEIC stands for High Efficiency Image Container — it's a wrapper format. The actual image data inside is encoded with HEVC (also called H.265), the same video codec used in 4K TVs and most video streaming. So an HEIC file is essentially a single still frame of an HEVC video.
This is why HEIC files are smaller than JPEGs at the same visual quality. HEVC was designed to compress video — finding redundancy in 30 frames per second of moving pictures — and it turns out the same techniques work very well on a single frame too.
Why Apple, why now
Apple switched iPhones to HEIC by default in iOS 11 (2017). The motivation was simple: storage. A 12-megapixel HEIC photo is roughly half the size of an equivalent JPEG, with no perceptible quality loss. For a billion phones taking trillions of photos, that's a massive cumulative win.
Apple also baked in support for related features that JPEG can't do well:
- Multiple images per file — Live Photos, burst mode, depth maps
- HDR metadata — preserves the wider dynamic range of newer sensors
- 10-bit color depth — smoother gradients than 8-bit JPEG
The downside: HEVC is patented, and the licensing is complicated. That's why Windows, Linux distributions, web browsers, and many image tools have been slow to adopt it natively.
Decoding HEIC in the browser
Browsers don't ship HEVC decoders by default — too much patent risk. So how do we convert HEIC to JPG without uploading the file?
The answer is heic2any, a JavaScript library that bundles libheif compiled to WebAssembly. libheif is an open-source HEIF/HEIC decoder used by tools like ImageMagick. Compiled to WebAssembly, it runs inside any modern browser tab. Pipeline:
- Load the file via the standard File API.
- Decode with
libheif(WebAssembly), producing raw RGBA pixel data. - Render that pixel data to an HTML5
<canvas>. - Re-encode the canvas as JPEG, PNG, or WebP at your chosen quality.
All four steps run inside your browser's tab. The HEIC bytes never leave your device. Try it: drop an HEIC into our image converter.
Why HEIC conversion is slower than JPEG conversion
HEVC is significantly more complex than JPEG. Decoding a 12-megapixel JPEG takes a few milliseconds; the same image as HEIC takes a few hundred milliseconds. WebAssembly + browser overhead adds another small constant. In practice you'll wait 1–3 seconds for a typical phone photo, longer for a 48-megapixel iPhone Pro shot.
Bulk conversions run sequentially because each decode is CPU-heavy and the browser only has so many cores to spare for a tab.
Quality considerations
HEIC files store more information than the equivalent JPEG would. When you convert, you're throwing some of that away — wider gamut becomes 8-bit, HDR is flattened, multiple images become one. For most purposes this is fine; you get a smaller file that works everywhere. But if you need to preserve the maximum quality (e.g. for professional photo editing), keep the HEIC original and convert only the working copy.
A pragmatic conversion default:
- JPEG, quality 0.9 for sharing (universal compatibility, ~30% of original size)
- WebP, quality 0.85 for web use (similar size to HEIC, broad support)
- PNG if you really need lossless and don't mind the larger file
Why we don't decode in the cloud
We could; it would be faster. But every HEIC is a personal photo. Photos contain faces, locations, timestamps, sometimes embedded GPS coordinates. Sending them to a server and trusting they'll be deleted is a meaningful privacy ask. The local approach is slower by a few seconds and orders of magnitude better for trust.
If you have an iPhone and need to share photos with non-Apple users on a regular basis, you can also tell iOS to take JPEG photos by default: Settings → Camera → Formats → Most Compatible. You'll lose the size benefit of HEIC, but every photo will be JPEG from the start.