Free webp to jpg
HEIF

High Efficiency Image File Format

image/heif Released 2015 · by Moving Picture Experts Group (MPEG)

HEIF (High Efficiency Image File Format) is a flexible container format for individual images and image sequences. Developed by MPEG, it supports various compression codecs (like HEVC, AVC, and JPEG), and provides advanced features such as alpha channels, depth maps, and rich metadata.

Photography Transparency Animation ✦ HDR Production Ready

Technical Specifications

MIME Type
image/heif
Extensions
.heif.hif
Container
HEIF / ISOBMFF (ISO/IEC 14496-12)
Compression
Lossy & Lossless
Algorithms
Codec Agnostic (HEVC, AVC, JPEG, AV1)
Color Depth
8-bit, 10-bit, 12-bit, 16-bit
Metadata
EXIF XMP ICC
Capabilities
Transparency
Animation
Progressive Loading
Alpha Channel
HDR Support
Official Specification
Aliases: image/heicimage/avic

Magic Bytes & HTTP Headers

File Signature (Magic Bytes)
XX XX XX XX 66 74 79 70 6D 69 66 31
ASCII: ....ftypmif1
HTTP Headers
Content-Type: image/heif
HTML Accept Attribute
accept="image/heif, .heif, .hif"

Browser Support Matrix

Browser Status Min Version
Chrome Chrome
Not Supported
Firefox Firefox
Not Supported
Safari Safari
Not Supported
Edge Edge
Not Supported
Internet Explorer Internet Explorer
Not Supported Legacy

Advantages & Limitations

Advantages
  • Highly flexible container that can store image bursts, animations, focal stacks, and stereo 3D images in one file
  • Natively supports depth maps and alpha channels, making it perfect for computational photography
  • When paired with modern codecs like HEVC or AV1, it provides massive storage savings over legacy formats like JPEG
Limitations
  • Codec agnosticism makes broad software decoding difficult, as the container might hold proprietary or unsupported codecs
  • Zero cross-platform web browser support, requiring conversion for online publishing
  • Often confused with the more specific 'image/heic' and 'image/avif' MIME types

Developer Code Snippets

import magic
print(magic.from_file('image.heif', mime=True)) # Outputs 'image/heif'
const FileType = require('file-type');
const type = await FileType.fromFile('image.heif');
console.log(type.mime); // image/heif
import "net/http"

// The standard net/http library struggles with HEIF. 
// Specialized ISOBMFF parsing is required to read the 'mif1' brand.
$mime = mime_content_type('image.heif');
echo $mime; // Standard servers often require an updated magic database to properly detect HEIF

File Detection Steps

How to programmatically detect a image/heif file by reading its raw bytes:

  1. 1 Check for ISOBMFF 'ftyp' box starting at byte offset 4
  2. 2 Verify general HEIF brand strings like 'mif1' or 'msf1' starting at byte offset 8

Software Support

A
Apple Photos
W
Windows Photos (with HEIF Extension)
A
Adobe Photoshop
ImageMagick ImageMagick
GIMP GIMP

Conversion Tools

Share & Embed

Markdown Badge
HEIF Format Badge
[![HEIF Format](https://freewebptojpg.com/mime/image/heif/badge.svg)](https://freewebptojpg.com/mime/image/heif)
Interactive iframe Widget
<iframe src="https://freewebptojpg.com/mime/image/heif/embed" width="100%" height="280" style="border:1px solid #cbd5e1;border-radius:8px;" title="HEIF Specs"></iframe>

JSON API

All data on this page is available as a free, open JSON API. Use it in your project, documentation, or tooling.

GET https://freewebptojpg.com/mime/image/heif.json Open JSON
Free to use
No auth required
CORS enabled
Use from any domain
Cached 24h
Cache-Control headers set

Frequently Asked Questions

What is the difference between HEIF and HEIC?

HEIF is the overarching container format (based on ISOBMFF) that can encapsulate various types of image data. HEIC is a specific, highly popular implementation of HEIF where the images are strictly encoded using the HEVC (H.265) video codec.

What is the magic byte for HEIF?

HEIF files utilize the ISOBMFF container structure. They begin with a 4-byte box size, followed by the 'ftyp' box identifier, and typically a major brand like 'mif1' (for still images) or 'msf1' (for sequences). The hex representation for a standard still HEIF is XX XX XX XX 66 74 79 70 6D 69 66 31 (....ftypmif1).

Do web browsers support HEIF?

Native support for general HEIF files in web browsers is almost non-existent. While Apple's Safari supports HEIC (HEVC-encoded HEIF), other browsers like Chrome, Edge, and Firefox do not natively support HEIF containers due to the complex licensing of underlying codecs.

Related Formats

Share this format