PhotoToJpgA PictureEditor.com tool

What HEIC is, and the ways out of it

A HEIC is not a broken JPG. It is a container holding a video frame, and every problem people have with it follows from that one fact.

What is actually in the file

HEIF — High Efficiency Image File Format — is a container, in the same family as the MP4 that holds a film. It does not itself define how the picture is compressed; it defines boxes, and the picture goes in one of them. When the picture inside is coded with HEVC, which is the video codec also called H.265, the file is given the extension .HEIC. That is the whole of the naming: HEIF is the box, HEVC is what is in it, HEIC is the two together.

Coding a still photograph as a single video frame is not a trick. HEVC has better prediction than JPEG’s 1992 arithmetic — it can describe a region by pointing at another region and saying how it differs, it uses variable block sizes rather than a fixed eight-by-eight grid, and its entropy coder is more efficient. The result is a photograph at roughly half the bytes for the same visible quality. On a phone that stores fifty thousand pictures, halving is not a detail.

The container does more than hold one picture. A single .HEIC can carry the still, a thumbnail, a depth map from portrait mode, an HDR gain map, an alpha channel, an image sequence, and the EXIF metadata block describing the camera. Some of that is the reason a HEIC opens in Photos and does something rich, and produces a flat picture everywhere else.

Why Windows so often cannot open one

HEVC is patented, and the licensing is distributed across several patent pools rather than one. That has a practical consequence: shipping an HEVC decoder inside an operating system costs the vendor money per copy. Apple pays it, because Apple sells the phone that produces the files. Microsoft did not, and instead put the codec in the Store as a separate download — for a while free, then paid, then bundled with some machines by the manufacturer and not others.

So the experience of a Windows user receiving a HEIC is arbitrary in a way that feels like the file is broken. On one laptop it opens. On another the Photos app shows a prompt to buy an extension. On a work machine where the Store is locked down, there is no route at all. None of that is a fault in the file, and none of it is fixable by renaming it — a .HEIC renamed to .jpg is still an HEVC frame in a HEIF box, and the program that opens it will say so.

Web browsers are the other half of the problem, and they went the other way from the usual pattern: Safari reads HEIC because macOS does, and Chrome and Firefox do not, which is why a HEIC dragged into a browser tab on Windows shows nothing.

Three ways out

One: stop the phone making them

Settings, then Camera, then Formats, then Most Compatible. Everything photographed after that is a JPG at the moment of capture, with no conversion step and no generation of loss, because the phone encodes straight to JPEG rather than encoding to HEIC and converting later. The cost is storage: the same library takes roughly twice the space.

This is the route that does not involve this site, and for anybody who keeps hitting the problem it is the right one. It does nothing about the photographs already taken.

Two: let the phone convert on the way out

Sharing a photo from iOS to most destinations converts it automatically. Mail, most messaging apps and most upload flows receive a JPG without being asked. AirDrop to a Mac and copying off the device with a cable both preserve the HEIC, which is why the files that reach a laptop are so often the ones that cause trouble. There is also a setting under Photos called Transfer to Mac or PC — set to Automatic, it converts on the way off the phone.

Three: convert the files you already have

Which is what the converter on this site does. The decoder is libheif compiled to WebAssembly, about 1.5 MB, downloaded to the browser the first time a HEIC is opened. It runs in this tab, on this machine, and produces JPEGs with the capture dates carried across. A folder of two hundred is a queue rather than two hundred visits.

What it cannot do is decode every profile. HEIC is a container, and some 10-bit sequences and some of the HEIF variants produced by Android phones use coding tools this build does not implement. Those rows fail with the reason named. The reliable answer in that case is to export a JPEG from the device that took the photograph, because that device has the decoder that matches.

What a conversion costs

Going from HEIC to JPEG is a decode and a re-encode, so it is a generation of loss. At quality 82 it is very hard to see on a photograph, and it is real. Going the other way later — JPEG back to HEIC — does not recover anything; it just spends another generation.

The colour is the part worth knowing about. A recent iPhone shoots in Display P3, which holds greens and reds that sRGB has no numbers for. A JPEG can be tagged as P3, but a great deal of software mishandles a tagged P3 JPEG and shows it over-saturated, so the safer conversion is to sRGB — which is what happens here, and which clips those colours to the edge of the smaller space. On a photograph of a person in a room, nothing visible. On a photograph of a sunset or a neon sign, a flattening in the most saturated parts.

The HDR gain map goes too. That is the extra layer that tells a capable display to push certain regions brighter than white; there is no standard place to put it in a baseline JPEG, and this converter does not invent one.

If you only remember one thing

A HEIC is not damaged and does not need repairing. It is a modern format that half the software in the world has not licensed. Either stop producing them, or convert the ones you have — and if a specific file refuses to convert anywhere, the device that took it is the only machine guaranteed to be able to read it.

Decoding and encoding both happen on this computer.