Skip to content

Convert video to an animated GIF

Turn any clip into a sharp animated GIF: pick the range, frame rate and width, with a two-pass palette for accurate colour. All local.

  • Runs in your browser
  • Files are never uploaded
  • Free, no account
Drop a video to turn into a GIFMP4, MOV, WebM, MKV, AVI — converted on your device, nothing uploaded.MP4, WEBM, MKV, MOV, AVI, M4V, MPG, MPEG, 3GP, OGV · up to 1024 MB each

First use downloads the 10 MB video engine from this site. After that it is cached and works offline. It is WebAssembly served from onthisdevice.com — no third-party CDN — and your file is still processed entirely on your own device.

How to turn a video into a GIF

  1. Drop a video in. The tool preselects the first six seconds, because that is what most GIFs should be.
  2. Drag the two handles to the exact moment you want, or play the video and press Set here to snap a handle to the playhead.
  3. Choose a frame rate and width. 12 fps at 480 px is the sweet spot between smoothness and file size.
  4. Leave the two-pass palette on unless you are in a hurry — it is the single biggest quality win.
  5. Press Create GIF, check the preview, and download.

Why GIFs get so large — and what to do about it

A GIF stores every frame as its own palettised image with only simple run-length compression. There is no motion prediction, so unlike H.264 it cannot say "this frame is the previous one shifted slightly". File size is therefore roughly proportional to width × height × frames. Three levers control it:

Lever Change Effect on size
Length 10 s → 5 s Halves it. The most effective and least visible change.
Width 640 → 480 px Roughly −45%, because area scales with the square.
Frame rate 24 → 12 fps Halves the frame count; looks fine for most screen captures.
Dithering Sierra2 → none Around −20%, at the cost of visible colour banding.

What the two-pass palette does

GIF allows a maximum of 256 colours per frame. The naive approach maps your video onto a generic web palette, which turns skin tones grey-green and gradients into stripes. The two-pass approach used here does better:

  1. Pass one — palettegen: FFmpeg scans every frame in your selected range and builds a 256-colour palette from the colours the clip actually contains, weighting the ones that change between frames (stats_mode=diff) so moving subjects are not sacrificed to a static background.
  2. Pass two — paletteuse: each frame is mapped onto that custom palette with error-diffusion dithering, which hides the remaining quantisation as fine noise instead of hard bands.

It costs roughly double the encoding time and is worth it in nearly every case. The exact filter chain is fps=N,scale=W:-2:flags=lanczos followed by the palette filters.

Dithering options compared

Mode Look Use when
Sierra2 4A Fine, natural grain Default — photographic or filmed content
Bayer Ordered cross-hatch pattern Flat UI colours; compresses better than error diffusion
Floyd–Steinberg Smooth gradients, slightly noisier Sunsets, skies, soft lighting
None Hard colour edges Screenshots, logos, line art — smallest files

When not to use a GIF

For anything longer than about ten seconds, an MP4 or WebM will be five to twenty times smaller at better quality, and every chat app, wiki and social network now plays short muted videos inline. Use GIF when the destination genuinely requires it — email signatures, some documentation systems, old forums — and use the video converter otherwise.

Questions

What is the two-pass palette and why does it matter?

GIF supports only 256 colours per frame. The first pass scans your clip and builds a palette from the colours it actually contains; the second maps every frame onto that palette. The result looks far better than the generic web palette, especially on skin tones and gradients.

Why is my GIF so much bigger than the video?

GIF has no motion compensation — each frame is stored almost independently. Cutting the frame rate to 10-12 fps, the width to 480 px and the length to a few seconds is what keeps a GIF small.

Which dithering option should I use?

Sierra2 4A is the best default. Bayer gives a crisp, ordered pattern that compresses well for flat graphics, and turning dithering off yields the smallest file but visible colour banding.

Can I make the GIF play only once?

Yes — set Looping to "Play once" under advanced options. That writes a loop count of zero into the GIF header instead of the infinite-loop flag.