Staaarter

HEIF to GIF Converter

Attempts to decode an uploaded HEIF/HEIC image via the browser's native image decoder, then re-encodes the resulting pixels as a single-frame GIF. HEIF decode support varies widely by browser and OS, so this tool reports an honest failure rather than a fabricated result when decoding doesn't work. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-29
By Staaarter Team
converterimagegifbrowser-dependent

Overview

Introduction

HEIF/HEIC is the photo format Apple devices use by default, and this tool attempts to convert one into a plain GIF, entirely inside your browser.

Because HEIF decode support is so browser-dependent, this tool is upfront about that: it tries the real, native browser decode path and reports an honest error if it fails, rather than guessing at pixel data.

What Is HEIF to GIF Converter?

A converter that attempts to decode an uploaded HEIF/HEIC image using the browser's built-in image decoding pipeline (createImageBitmap), then re-encodes any successfully decoded pixels as a GIF.

It has no HEIF decoder of its own; it entirely depends on native OS/browser codec support, which is inconsistent.

How HEIF to GIF Converter Works

The uploaded file is passed to the browser's createImageBitmap() API. On a browser/OS combination with HEIF decode support, this succeeds and yields real pixel data; on most others, it throws, which this tool catches and reports as a clear, specific error.

Decoded pixels are drawn to an off-screen canvas to extract raw RGBA data, then handed to this category's shared encodeGif() function to produce a single-frame GIF89a file, quantizing colors down to a fixed 216-color palette.

When To Use HEIF to GIF Converter

Use it on a Safari/Apple-platform browser where HEIC decoding is likely to work, when you need a widely-compatible GIF from an iPhone photo.

Don't rely on it in Chromium or Firefox: expect it to fail there with a clear explanation, not a workaround.

Features

Advantages

  • Uses the browser's real, native HEIF decoder where one exists, rather than attempting a hand-rolled (and likely broken) HEVC decode.
  • Fails honestly and specifically when the browser can't decode HEIF, instead of returning corrupted or blank pixel data.
  • Runs entirely client-side, so a personal photo never leaves your device even when the conversion does work.

Limitations

  • HEIF/HEIC decoding is not available in most non-Apple browsers; expect failures on Chromium and Firefox regardless of OS.
  • Only a single still image is produced, since createImageBitmap only exposes one decoded frame.
  • GIF's fixed 216-color palette means photographic gradients from the source HEIF/HEIC can visibly band after conversion.

Examples

Converting an iPhone photo on Safari

Input

IMG_0421.HEIC (4032x3024)

Output

converted.gif (4032x3024, quantized to a 216-color palette)

Safari's native HEIC decoder successfully produces pixel data, which is then re-encoded through this category's shared GIF encoder.

Attempting the same file on a non-Apple browser

Input

IMG_0421.HEIC

Output

An error explaining HEIF/HEIC decoding isn't supported by this browser

createImageBitmap() throws, and that failure is surfaced as a specific, honest error rather than silent corruption.

Best Practices & Notes

Best Practices

  • Try Safari on an Apple device first if you need this conversion to actually succeed.
  • Don't build an automated pipeline around this tool unless you control the exact browser it runs in: HEIF decode support is too inconsistent.
  • If decoding fails, convert the HEIC to JPEG or PNG on your device (most phones offer this natively) before uploading here.

Developer Notes

convertHeifPixelsToGif is a thin wrapper around the shared encodeGif() function, mirroring png/lib/heif-to-png-converter.ts's approach: the component attempts the actual browser decode via createImageBitmap and only calls this lib function with a real PixelBuffer on success. The lib function itself just validates and forwards to encodeGif([{ image, delayCs: 10 }], 1).

HEIF to GIF Converter Use Cases

  • Converting an iPhone HEIC photo to a widely-supported GIF for sharing on platforms that don't accept HEIC
  • Testing whether a given browser/OS combination can decode HEIF at all
  • Quickly previewing a HEIC file's contents in a browser tab, when it can be decoded

Common Mistakes

  • Assuming a failed conversion means the HEIC file is corrupted: it's almost always just a missing browser decoder.
  • Expecting output color fidelity to match the original photo; GIF's 216-color palette is a hard ceiling.

Tips

  • If this tool fails, your OS's Photos app or Files app almost certainly has a built-in 'export as JPEG/PNG' option that sidesteps the browser decode issue entirely.
  • Pair with heif-to-png-converter for a higher-fidelity (non-palette-limited) conversion when GIF's small color palette isn't a requirement.

References

Frequently Asked Questions