File types · Explainer

The HEIC file (.heic)

A HEIC file is a photo compressed with HEVC, the video codec also known as H.265, and it's the format iPhones save photos in by default. This guide explains what's inside one, why so much software still can't open it, how to convert it, and has free sample HEIC files to download for testing.

At a glance

Full name
HEIF (High Efficiency Image File Format) with HEVC-coded images; heic is the name of that combination's brand
Extensions
.heic; .heics for image sequences. HEIF files in general use .heif or .hif
MIME type
image/heic (image/heic-sequence for sequences); image/heif for HEIF in general. Registered with IANA by ISO/IEC
Kind
Binary raster image in a HEIF (ISO base media file format) container; HEVC compression, lossy in practice
Standard
HEIF is ISO/IEC 23008-12 (MPEG); HEVC is ISO/IEC 23008-2 and ITU-T H.265
First released
HEIF finalised in 2015 and published in 2017; the iPhone default since iOS 11 (2017)
Colours
8 or 10 bits per channel in practice; optional alpha; can hold depth maps, HDR gain maps and other auxiliary images
Licensing
HEVC is covered by patents, licensed through patent pools and individual companies
Magic number
66 74 79 70 68 65 69 63 (ftypheic) from byte 4, after a 4-byte box size; ftypheix for 10-bit files, sometimes ftypmif1
Opens with
iPhone, iPad and Mac (macOS 10.13+); Safari 17+; Windows with Microsoft's HEIF and HEVC extensions; Android 9+ on most devices

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.

sample-photo.heic (hex and box map)
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. 100 00 00 1C 66 74 79 70 68 65 69 63

    The ftyp box and brands

    Size 28, ftyp, then the major brand heic: HEVC images in a HEIF file. mif1 (any HEIF image) and miaf (the stricter MIAF profile) follow as compatible brands. A 10-bit file says heix instead; recent iPhones list several more.

  2. 2idat: 00 00 02 03 06 40 04 B0

    The grid description

    Inside idat, 8 bytes describe the grid item: version 0, flags 0, then rows minus one (02, so 3), columns minus one (03, so 4), and the output size, 06 40 = 1600 by 04 B0 = 1200. Four 512-pixel tiles make 2,048 pixels across, so the decoder crops the right and bottom edges.

  3. 3iinf: grid, hvc1 × 12, Exif, mime, hvc1

    The items

    The primary item is not an image itself but a grid that 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. 4pitm: item 1

    The 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. 5hvcC

    The 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. 6colr: nclx 1 / 13 / 6

    The 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. 7iref: dimg, cdsc, thmb

    References between items

    dimg builds the grid from its tiles, cdsc attaches metadata to the picture, and thmb marks the small preview image. In iPhone files, auxl references also attach depth maps, portrait mattes and an HDR gain map.

  8. 8mdat

    The 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:

ItemWhat it is
ThumbnailA small HEVC image (on iPhones about 416 × 312) for fast previews, linked with a thmb reference.
ExifDate, camera settings, orientation and, if location is on, GPS coordinates.
XMPMore metadata as XML, including editing information.
Depth map and mattesGreyscale auxiliary images from Portrait mode and the camera's processing, for example masks for a person, their skin or the sky.
HDR gain mapA lower-resolution auxiliary image that tells HDR screens how much brighter each area should be.
AlphaTransparency, 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.

WhereHEIC support
SafariYes, since Safari 17 (2023), using the system decoder
Chrome, Edge, FirefoxNo, not even where the operating system can decode it
iPhone, iPad, MacYes: iOS 11 and later, macOS 10.13 High Sierra and later
Windows 10 and 11With Microsoft's HEIF Image Extensions and HEVC Video Extensions from the Microsoft Store
AndroidDecoding 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

HEICJPGAVIFWebP
CodecHEVC (H.265)JPEG (DCT)AV1VP8, or WebP lossless
ContainerHEIFJFIF or ExifHEIFRIFF
Bits per channel8, 10 (more is possible)8 (usually)8, 10, 128
TransparencyYesNoYesYes
Several images, depth, gain mapsYesNo (gain-map extensions exist)YesNo
BrowsersSafari onlyAllAll currentAll current
Royalty-freeNoYesYesYes
Best forPhotos on Apple devicesSending photos to anyonePhotos on websitesImages 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 (called heif-dec in newer versions).
  • Anywhere: magick photo.heic photo.jpg with ImageMagick built with libheif. Online converters work too, but they mean uploading your photos to someone else's server.
  • Inspect one: heif-info photo.heic lists the images, thumbnails, auxiliary images and metadata; exiftool photo.heic shows 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.

sample-photo.heic · 139.0 KBDownload

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.

  1. ftyp: heic, with mif1 and miaf

    An HEVC image in a HEIF file that also follows the MIAF rules.

  2. A grid of 12 tiles

    The primary item is a grid of 3 rows by 4 columns of 512 × 512 HEVC tiles, cropped to 1600 × 1200. Decoders that don't assemble grids fail here.

  3. HEVC Main Still Picture, 8-bit 4:2:0

    Each tile is one intra-coded HEVC frame, at an x265 quality setting of 44.

  4. A 320 × 240 thumbnail

    A separate HEVC image linked with a thmb reference, for quick previews.

  5. Exif

    Make 99helpers, model Sample Camera 1 (fictional), a date, artist Ada Example (fictional) and a copyright line pointing to this page. No GPS.

  6. 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 auxl auxiliary 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.heic on your form. Decide whether to accept it, convert it on the server or reject it with a clear message. Browsers may label it image/heic or send no type at all, so check the file's first bytes rather than trusting the label.
  • Grid handling: convert sample-photo.heic to JPEG. You should get the whole 1600 × 1200 landscape, not one 512-pixel tile or the 320-pixel thumbnail.
  • Transparency: convert sample-transparent.heic to PNG; the background should stay transparent.
  • Several images: heif-info sample-multi-image.heic should list three top-level images, with image 1 as primary.
  • Size limits: sample-100kb.heic is 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

Last reviewed 27 October 2026.