Convert HEVC to GIF — Free Online Tool

Convert HEVC/H.265 video files to animated GIF directly in your browser. This tool decodes your H.265-compressed video and re-encodes each frame using GIF's palette-based color engine, producing a looping animation ready for web use — no upload required.

FFmpeg Command

Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg

Free — no uploads, no signups. Your files never leave your browser.

Estimated output:

Conversion Complete!

Download

How It Works

HEVC (H.265) is a modern video codec that stores frames using complex inter-frame prediction, achieving very high compression by encoding only the differences between frames. GIF, by contrast, stores every frame as a full indexed image limited to 256 colors per frame. During this conversion, FFmpeg fully decodes every HEVC frame from its compressed representation, then re-encodes each one as an indexed color image using the GIF codec. Because GIF has no audio channel, all audio is automatically dropped. The output is a looping GIF where each frame is independently stored — meaning GIF files are often dramatically larger than the HEVC source despite containing far less visual information, especially for longer or higher-resolution clips.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary — the open-source multimedia processing engine that handles decoding the HEVC input and encoding the GIF output. In this browser-based tool, it runs as a WebAssembly (FFmpeg.wasm) build entirely inside your browser.
-i input.hevc Specifies the input file — your HEVC/H.265-encoded video. FFmpeg reads and fully decodes the H.265 bitstream frame by frame to reconstruct the raw pixel data before passing it to the GIF encoder.
-c:v gif Sets the video encoder to GIF, instructing FFmpeg to encode each decoded HEVC frame as an indexed-color GIF image frame. This triggers FFmpeg's built-in GIF encoder, which quantizes each frame's pixel data down to a 256-color palette.
-loop 0 Embeds the Netscape loop extension in the output GIF file, instructing browsers and viewers to loop the animation infinitely. A value of 0 means endless looping; any positive integer sets an exact repeat count.
output.gif The name of the output file. The .gif extension tells FFmpeg to wrap the encoded GIF frames in a GIF89a container — the standard GIF format supported universally by browsers, messaging apps, and image viewers.

Common Use Cases

  • Clip a short moment from an HEVC screen recording (e.g., a UI animation or software demo) to share as a looping GIF in a GitHub README or issue comment
  • Extract a reaction clip from an H.265-encoded video to post on platforms that accept GIF but not modern video codecs
  • Convert a brief HEVC drone or slow-motion clip into a looping GIF for embedding in a blog post or article where video autoplay is restricted
  • Turn an HEVC animation render (from Blender or After Effects) into a GIF for quick client preview without sending a full video file
  • Create a looping product animation GIF from HEVC marketing footage for use in email campaigns, where GIF is the only supported motion format
  • Convert a short HEVC gameplay clip into a GIF for sharing on forums or Discord servers that don't support H.265 playback inline

Frequently Asked Questions

This is expected and is a fundamental difference between the two formats. HEVC achieves extreme compression by encoding only the changes between frames and using sophisticated prediction algorithms, often reaching quality parity with H.264 at half the file size. GIF stores every frame as a complete indexed image and uses only simple LZW compression with no inter-frame prediction. A 10-second 1080p HEVC clip at a few megabytes can easily become a 50–200MB GIF. For web use, keep GIF conversions to very short clips — ideally under 5 seconds — and consider reducing the resolution or frame rate before converting.
Yes, almost certainly. GIF is limited to a maximum of 256 colors per frame, while HEVC can represent millions of colors with smooth gradients. Any footage with natural color transitions, skin tones, skies, or subtle shadows will show visible banding and dithering artifacts in the GIF output. High-contrast graphics, pixel art, or footage that already has a limited color palette will convert with much less visible quality loss. The conversion is lossless in the sense that GIF stores its indexed colors without further lossy compression, but the color quantization from millions of colors down to 256 is itself a significant lossy step.
Yes — the command includes the flag '-loop 0', which instructs FFmpeg to set the GIF's Netscape loop extension to loop infinitely. This is the standard behavior expected for GIFs on the web. If you want the GIF to play only once and stop, change '-loop 0' to '-loop 1' in the FFmpeg command. A value of '-loop 2' would play it twice, and so on.
All audio is discarded during this conversion. The GIF format has no concept of an audio channel — it is a purely visual format capable only of displaying a sequence of still frames. FFmpeg will automatically drop the audio stream from your HEVC input because the output container (GIF) cannot carry it. There is no flag you can add to preserve audio in a GIF; if you need synchronized audio, consider converting to a video format like MP4 or WebM instead.
HDR HEVC footage will not convert correctly without additional tone-mapping. HDR video uses a wide color gamut and high dynamic range transfer functions (like PQ/ST.2084 or HLG) that GIF cannot represent. Without explicit tone-mapping, colors in the output GIF will likely appear washed out, oversaturated, or incorrectly exposed. For HDR source files, you would need a more advanced FFmpeg command that includes a tone-map filter (such as 'zscale' and 'tonemap') before the GIF encoding step. This tool applies a direct conversion without tone-mapping, so HDR sources are best converted after tone-mapping manually.
The base command does a single-pass palette generation, which produces decent but not optimal results. For significantly better color quality, run a two-pass conversion using FFmpeg's 'palettegen' and 'paletteuse' filters locally: first generate a custom palette from your specific video ('ffmpeg -i input.hevc -vf palettegen palette.png'), then encode using that palette ('ffmpeg -i input.hevc -i palette.png -filter_complex paletteuse output.gif'). To reduce file size, scale down the resolution with '-vf scale=480:-1' or reduce the frame rate with '-r 10' before the GIF encoder. These options are best run locally using the displayed FFmpeg command as your starting point.

Technical Notes

HEVC and GIF sit at opposite ends of the video technology spectrum. HEVC is a modern, computationally intensive codec designed to compress high-resolution, high-frame-rate video with rich color and dynamic range into as small a bitstream as possible. GIF is a 1987 format designed for simple web graphics with extremely limited color capacity. During conversion, FFmpeg must fully decode the HEVC bitstream — including resolving its inter-frame prediction chains — to reconstruct every raw frame before handing them to the GIF encoder. The GIF codec then quantizes each frame's colors to a 256-color palette using its indexed color model. FFmpeg's default GIF palette is a global palette derived from the entire video, which can cause suboptimal color reproduction for footage with highly varied scenes. The '-loop 0' flag embeds the Netscape 2.0 Application Extension loop block in the GIF, which instructs browsers to loop the animation indefinitely. Transparency is supported by the GIF format (and FFmpeg's GIF encoder can write transparent pixels), but since this conversion comes from an HEVC source — which does not support an alpha channel — no transparency will be present in the output. GIF also does not support chapters, subtitles, or multiple tracks of any kind. For files longer than a few seconds at full resolution, the output GIF will likely be impractically large; reducing resolution and frame rate via FFmpeg filter flags before encoding is strongly recommended for real-world use.

Related Tools