The basics
What is a HEIC file?
HEIC is the format iPhones and iPads save photos in. Apple made it the default in iOS 11 (2017), on iPhone 7 and later, because it stores a photo in noticeably less space than JPEG at similar quality, and can hold things JPEG can't: 10-bit colour, transparency, several images in one file, depth information for Portrait mode and, on recent iPhones, an HDR gain map that makes highlights brighter on HDR screens.
The name comes from two standards that work together:
- HEIF, the High Efficiency Image File Format (ISO/IEC 23008-12, from MPEG): a container, built on the same box structure as MP4, that holds images, their properties and metadata.
- HEVC, High Efficiency Video Coding (H.265): the video codec that compresses each image. A HEIC photo is, in effect, a set of video key frames.
So HEIC is HEIF with HEVC inside. The same container can hold other codecs: with AV1 it's AVIF, and with JPEG or H.264 it's usually labelled .heif. Canon, Sony and Fujifilm cameras that shoot HEIF use the .hif extension.
Live Photos
A Live Photo is not one file. It's a HEIC (or JPEG) still plus a short .mov video with the same name, linked by an identifier in their metadata. Share only the HEIC and you get the still.
Anatomy
What's inside a HEIC file
A HEIC file is built from boxes, the structure of MP4 video files: each box starts with a 4-byte size and a 4-letter type, and some contain other boxes. Images are items, described in the meta box and stored in mdat. sample-photo.heic is laid out the way an iPhone lays out a photo: the picture is a grid of 512 × 512 tiles, with a thumbnail and Exif data. Here are its first bytes and a map of every box.
00 00 00 1C 66 74 79 70 68 65 69 63 00 00 00 00
6D 69 66 31 68 65 69 63 6D 69 61 66
offset box size contents
000000 ftyp 28 brand "heic"; also mif1, heic, miaf
00001C meta 1,335 everything about the images except pixels
000028 hdlr 33 handler "pict"
000049 idat 16 grid layout: 3 rows × 4 columns, 1600 × 1200
000059 iloc 336 where each item's bytes sit in the file
0001A9 iinf 371 the items:
1 grid the picture, built from tiles
2–13 hvc1 twelve 512 × 512 HEVC tiles
14 Exif Exif metadata
15 mime XMP metadata
16 hvc1 a 320 × 240 thumbnail
00031C pitm 14 the primary item is item 1, the grid
00032A iprp 463 properties, and which item has which
000332 ipco 343 ispe 1600 × 1200, hvcC, colr (nclx),
ispe 512 × 512, pixi 8-bit, hvcC, ispe 320 × 240
000489 ipma 112
0004F9 iref 90 dimg: item 1 is made of items 2 to 13
cdsc: items 14 and 15 describe item 1
thmb: item 16 is a thumbnail of item 1
000553 mdat 140,953 twelve tiles (136,045 bytes), Exif,
XMP, then the thumbnail (4,051 bytes)
end of file at 142,316 bytes- 1
00 00 00 1C 66 74 79 70 68 65 69 63The ftyp box and brands
Size 28,
ftyp, then the major brandheic: HEVC images in a HEIF file.mif1(any HEIF image) andmiaf(the stricter MIAF profile) follow as compatible brands. A 10-bit file saysheixinstead; recent iPhones list several more. - 2
idat: 00 00 02 03 06 40 04 B0The grid description
Inside
idat, 8 bytes describe thegriditem: version 0, flags 0, then rows minus one (02, so 3), columns minus one (03, so 4), and the output size,06 40= 1600 by04 B0= 1200. Four 512-pixel tiles make 2,048 pixels across, so the decoder crops the right and bottom edges. - 3
iinf: grid, hvc1 × 12, Exif, mime, hvc1The items
The primary item is not an image itself but a
gridthat points to twelve HEVC-coded tiles (hvc1). Splitting a large photo into tiles keeps each one within the limits of hardware decoders and lets the tiles be decoded in parallel. - 4
pitm: item 1The primary item
The picture a viewer shows. A HEIF file can hold many images; the others can be alternatives, a burst, or auxiliary images such as depth maps.
- 5
hvcCThe HEVC decoder settings
Profile, level, colour format and bit depth, plus the HEVC parameter sets the decoder needs before it can read a tile. This file uses the HEVC Main Still Picture profile with 4:2:0 colour, the same as iPhone photos.
- 6
colr: nclx 1 / 13 / 6The colour description
BT.709 primaries with the sRGB transfer curve. iPhones store an ICC profile here instead, usually for the wider Display P3 colour space.
- 7
iref: dimg, cdsc, thmbReferences between items
dimgbuilds the grid from its tiles,cdscattaches metadata to the picture, andthmbmarks the small preview image. In iPhone files,auxlreferences also attach depth maps, portrait mattes and an HDR gain map. - 8
mdatThe media data
The coded tiles, the Exif block, the XMP text and the thumbnail. Each tile is a run of HEVC NAL units, each preceded by its length in 4 bytes: the first tile starts
00 00 48 E6, a length of 18,662 bytes.
Under the hood
How a HEIC photo is put together
HEVC compresses each image much as it compresses a video key frame: the picture is split into blocks of varying size, each block is predicted from pixels already decoded nearby, and only the difference is transformed, rounded (the lossy step) and packed. The result is typically smaller than JPEG for the same visual quality, because the prediction and the flexible block sizes waste fewer bits on smooth areas.
The HEIF container then describes how the picture is assembled. A 12-megapixel iPhone photo of 4032 × 3024 pixels, for example, is stored as 48 tiles of 512 × 512 (8 across, 6 down, with the edges cropped), joined by a grid item. Alongside it there are usually:
| Item | What it is |
|---|---|
| Thumbnail | A small HEVC image (on iPhones about 416 × 312) for fast previews, linked with a thmb reference. |
| Exif | Date, camera settings, orientation and, if location is on, GPS coordinates. |
| XMP | More metadata as XML, including editing information. |
| Depth map and mattes | Greyscale auxiliary images from Portrait mode and the camera's processing, for example masks for a person, their skin or the sky. |
| HDR gain map | A lower-resolution auxiliary image that tells HDR screens how much brighter each area should be. |
| Alpha | Transparency, stored as a separate greyscale HEVC image. Rare in photos; see sample-transparent.heic. |
Rotation
HEIF stores rotation and mirroring as transform properties (irot, imir) that every decoder applies. Readers are expected to ignore the Exif orientation tag in a HEIC. A converter that rotates the pixels and then copies an Exif orientation tag unchanged into the JPEG can make the photo turn twice; good converters reset that tag to 1.
On the iPhone
How to stop an iPhone saving HEIC, and when it converts to JPEG
To save new photos as JPEG instead, open Settings > Camera > Formats and choose Most Compatible. Choose High Efficiency to go back to HEIC. Photos already taken stay as they are.
Even with High Efficiency on, iPhones often convert to JPEG on the way out, so you may never see a HEIC file:
- AirDrop, Messages and Mail may send a JPEG when the receiving device or app might not support HEIC.
- Importing to a Mac or PC with Photos, Image Capture or a Windows import may convert to JPEG. To keep the original HEIC files, go to Settings > Apps > Photos and choose Keep Originals.
- iCloud Photos keeps the original format.
- Websites that ask for a photo through the iPhone's file picker often receive a JPEG, because iOS can convert the photo for the upload.
Patents
Why most browsers and apps can't open HEIC
The container is not the problem; the codec is. HEVC is covered by many patents, licensed through several patent pools and by individual companies, with fees and terms that differ between them. A company that ships an HEVC decoder in a free browser to billions of devices takes on that cost and legal uncertainty. Apple, Microsoft and phone makers license HEVC for their own platforms; most other software relies on the operating system's decoder or doesn't support the format at all.
| Where | HEIC support |
|---|---|
| Safari | Yes, since Safari 17 (2023), using the system decoder |
| Chrome, Edge, Firefox | No, not even where the operating system can decode it |
| iPhone, iPad, Mac | Yes: iOS 11 and later, macOS 10.13 High Sierra and later |
| Windows 10 and 11 | With Microsoft's HEIF Image Extensions and HEVC Video Extensions from the Microsoft Store |
| Android | Decoding since Android 9 on most devices; some Android cameras can save HEIF |
That's why HEIC is a capture and storage format, not a web format. For images on websites the royalty-free alternatives are AVIF and WebP; to send a photo to anyone, JPEG is still the safe choice.
Comparison
HEIC vs JPG, AVIF and WebP
| HEIC | JPG | AVIF | WebP | |
|---|---|---|---|---|
| Codec | HEVC (H.265) | JPEG (DCT) | AV1 | VP8, or WebP lossless |
| Container | HEIF | JFIF or Exif | HEIF | RIFF |
| Bits per channel | 8, 10 (more is possible) | 8 (usually) | 8, 10, 12 | 8 |
| Transparency | Yes | No | Yes | Yes |
| Several images, depth, gain maps | Yes | No (gain-map extensions exist) | Yes | No |
| Browsers | Safari only | All | All current | All current |
| Royalty-free | No | Yes | Yes | Yes |
| Best for | Photos on Apple devices | Sending photos to anyone | Photos on websites | Images on websites |
Converting a HEIC to JPEG doesn't make the picture better: it re-compresses an already compressed image, so the JPEG is usually larger and very slightly worse. The 10-bit colour, depth data and HDR gain map are dropped, unless the converter writes one of the newer JPEG gain-map formats.
How to
How to open a HEIC file and convert HEIC to JPG
- On a Mac: double-click to open in Preview. To convert, choose File > Export and pick JPEG or PNG. For many files at once, select them in Preview's sidebar and export together, or use Terminal:
sips -s format jpeg photo.heic --out photo.jpg. - On Windows: install HEIF Image Extensions and HEVC Video Extensions from the Microsoft Store; the HEVC one costs a small fee unless your PC came with it. Photos then opens HEIC files and can save a copy as JPEG.
- On an iPhone: the Photos app shows them. Sharing or uploading a photo to an app that wants JPEG often converts it automatically.
- On Android: Google Photos and most gallery apps on Android 9 and later usually open HEIC.
- On Linux: GIMP and most image viewers open HEIC through libheif. The libheif tools convert from the command line:
heif-convert photo.heic photo.jpg(calledheif-decin newer versions). - Anywhere:
magick photo.heic photo.jpgwith ImageMagick built with libheif. Online converters work too, but they mean uploading your photos to someone else's server. - Inspect one:
heif-info photo.heiclists the images, thumbnails, auxiliary images and metadata;exiftool photo.heicshows the Exif data.
Troubleshooting
Common HEIC problems
- A website rejects the photo. Most upload forms only accept JPEG, PNG or WebP. Convert to JPEG first, or upload from the iPhone directly, which often converts automatically.
- It opens on one PC but not another. Windows needs both extensions above: the HEIF one reads the container, the HEVC one decodes the images inside it.
- The photo is sideways or upside down after converting. See the rotation note above: the converter applied the rotation and also kept an Exif orientation tag. Reset the tag with
exiftool -Orientation=1 -n photo.jpg, or use a different converter. - Colours look duller after converting. iPhone photos are usually in the wider Display P3 colour space. A converter that drops the ICC profile leaves the numbers to be read as sRGB, which looks less saturated.
- Only part of the picture or a tiny image appears. Some simple or old decoders show the thumbnail or the first tile instead of assembling the grid.
Privacy
Privacy: what a HEIC photo carries
A HEIC can't run code, but it usually carries more than the picture you see:
- GPS location in the Exif data, when location is on for the Camera app, the same as in a JPEG.
- Date, time and device details, down to the lens and camera settings.
- Depth maps and mattes: the outline of the people in the photo, as separate images that a viewer doesn't show.
- The thumbnail, which an editor that crops the main image might not update.
On an iPhone, tap Options at the top of the share sheet and switch off Location before sharing. Elsewhere, exiftool -all= photo.heic removes the metadata, and converting to JPEG drops the depth data and mattes. Check the result: open sample-photo.heic below in your usual tools to see where they show Exif data.
Free downloads
Sample HEIC files to download
Free sample HEIC files for testing uploads, converters and HEIF decoders: an iPhone-style tiled photo, transparency, 10-bit colour, a file with three images and an exact-size file. All were made with libheif and the x265 encoder, and decode with pillow-heif and ImageMagick. Most browsers can't display them, so download them to look inside.
Browsers can't show this kind of file in a page. Download it to open it in the app it belongs to.
What's inside sample-photo.heic
sample-photo.heic is a 1600 × 1200 photo-style image stored the way an iPhone stores photos. Run heif-info on it, or open it in a hex editor, to find these parts.
ftyp: heic, with mif1 and miaf
An HEVC image in a HEIF file that also follows the MIAF rules.
A grid of 12 tiles
The primary item is a
gridof 3 rows by 4 columns of 512 × 512 HEVC tiles, cropped to 1600 × 1200. Decoders that don't assemble grids fail here.HEVC Main Still Picture, 8-bit 4:2:0
Each tile is one intra-coded HEVC frame, at an x265 quality setting of 44.
A 320 × 240 thumbnail
A separate HEVC image linked with a
thmbreference, for quick previews.Exif
Make
99helpers, modelSample Camera 1(fictional), a date, artistAda Example(fictional) and a copyright line pointing to this page. No GPS.XMP
A title and rights statement as XML.
All sample HEIC files
HEIC photo (iPhone-style grid)
sample-photo.heic · 139.0 KB (142,316 bytes)
A 1600 × 1200 synthetic landscape stored as a grid of twelve 512 × 512 HEVC tiles, with a 320 × 240 thumbnail, Exif and XMP.
- Testing HEIC uploads and conversion to JPEG
- Checking a decoder assembles grid images
HEIC with transparency
sample-transparent.heic · 35.1 KB (35,922 bytes)
The 640 × 400 transparent artwork from our PNG page, with the alpha channel stored as a separate greyscale HEVC image (an
auxlauxiliary item).- Checking converters keep alpha from HEIC
- Decoder tests for auxiliary images
10-bit HEIC
sample-10bit.heic · 13.7 KB (14,040 bytes)
A 1024 × 512 set of smooth gradients at 10 bits per channel (brand
heix), with a dark ramp where an 8-bit conversion shows steps.- Checking a pipeline keeps or converts 10-bit depth cleanly
- Testing decoders that only handle 8-bit HEVC
HEIC with three images
sample-multi-image.heic · 48.4 KB (49,516 bytes)
Three separate 800 × 600 images in one file, numbered 1 to 3. Image 1 is the primary image; most viewers show only that one.
- Testing tools that list or extract every image
- Checking which image a thumbnailer picks
100 KB HEIC file
sample-100kb.heic · 100 KB (102,400 bytes)
A single 1280 × 960 HEVC image, padded with whitespace inside its XMP item to exactly 102,400 bytes.
- Upload and size-limit tests at 100 KB
- Checking upload forms that accept or reject HEIC
Ways to test with them
- Upload acceptance: try
sample-photo.heicon your form. Decide whether to accept it, convert it on the server or reject it with a clear message. Browsers may label itimage/heicor send no type at all, so check the file's first bytes rather than trusting the label. - Grid handling: convert
sample-photo.heicto JPEG. You should get the whole 1600 × 1200 landscape, not one 512-pixel tile or the 320-pixel thumbnail. - Transparency: convert
sample-transparent.heicto PNG; the background should stay transparent. - Several images:
heif-info sample-multi-image.heicshould list three top-level images, with image 1 as primary. - Size limits:
sample-100kb.heicis exactly 102,400 bytes, so you can test a 100 KB limit at the boundary.
Free to use for testing, teaching and demos, commercially or not, with no attribution needed. A link back to this page is always appreciated.
Put it online
Have a HEIC file? Give it a link.
Drop a HEIC on 99helpers and it gets its own web address. Most browsers can't display HEIC, so visitors on Safari see the photo and others download the file; convert it to JPEG first if everyone should see it in the browser.
Questions
HEIC files, frequently asked
What is a HEIC file?
A photo stored in the HEIF container and compressed with the HEVC (H.265) codec. iPhones and iPads save photos as HEIC by default.
How do I open a HEIC file on Windows?
Install HEIF Image Extensions and HEVC Video Extensions from the Microsoft Store, then open it in Photos. The HEVC extension costs a small fee unless your PC came with it.
How do I convert HEIC to JPG?
On a Mac, open it in Preview and choose File > Export > JPEG. On Windows, open it in Photos (with the extensions) and save a copy as JPEG. On the command line, sips -s format jpeg photo.heic --out photo.jpg (Mac) or magick photo.heic photo.jpg.
How do I make my iPhone take JPEG photos instead?
Settings > Camera > Formats > Most Compatible. New photos are then saved as JPEG; existing ones don't change.
Is HEIC better quality than JPEG?
At the same file size, usually yes; at the same quality it's usually smaller. It also supports 10-bit colour and HDR. The catch is compatibility: far fewer apps and websites accept it.
Why can't Chrome open HEIC files?
HEVC, the codec inside HEIC, is covered by patents that must be licensed. Chrome, Edge and Firefox don't include an HEVC image decoder; Safari uses the one built into Apple's systems.
What's the difference between HEIC and HEIF?
HEIF is the container format. HEIC is a HEIF file whose images are compressed with HEVC. Files with .heif may use HEVC too, or another codec.
Does converting HEIC to JPG lose quality?
A little, because the image is compressed a second time, and 10-bit colour, depth data and HDR information are dropped. At a high JPEG quality setting the difference is hard to see.
Related formats
Other file types explained
Keep going
Related
Sources
- Library of Congress: HEIF format description
- Apple Support: Using HEIF or HEVC media on Apple devices
- Apple WWDC23: What's new in web images (HEIC in Safari 17)
- Can I use: HEIF/HEIC image format
- IANA: image media types
- Android Developers: supported media formats
Last reviewed 27 October 2026.