Why Do This in Your Browser?
GIFs remain the lingua franca of chat platforms — Slack, Discord, iMessage, email — because they autoplay without controls and need no plugin. Yet most online GIF makers either limit length, watermark output, or upload your video to their servers. For a 5-second loop, none of that is necessary.
This tool generates a GIF from any video, in browser. Set a start time and end time, choose framerate and output width, optionally apply a custom palette, and the export runs locally via FFmpeg.wasm. The two-pass palette generation produces noticeably better color fidelity than naive single-pass conversions.
How It Works
GIF is limited to 256 colors per frame, so naive video-to-GIF conversions look posterized. The high-quality path is two-pass: first generate a custom palette optimized for the video's actual colors, then map each frame against that palette with Floyd-Steinberg dithering. The output is dramatically cleaner than the same video converted with a single global palette.
File-size strategy: GIFs grow linearly with framerate × width × duration. In our tests a 5-second 480 px, 15 fps GIF came out at 2.8–6.5 MB depending on the footage, and 30 fps roughly doubled that (worked example below). The tool shows a size range as you adjust settings, measured from real exports of camera footage (October 13, 2026); the real size is shown after export.
Tip: Trim long videos down to the loop you want with the Video Trimmer before GIF conversion. For captioned GIFs, add text via the Video Watermark tool first, then convert.
Common Use Cases
Worked example: what a 5-second clip actually weighs
On October 12, 2026 we ran the tool's own FFmpeg commands (copied from this page's code: palettegen=stats_mode=diff then paletteuse=dither=floyd_steinberg, Lanczos scaling) with desktop FFmpeg 6.1 on three 5-second clips: the first 5 s of the default Start 0 / End 5 range. GIF sizes below are at 15 fps; the last column is the same 480 px, 15 fps clip encoded as H.264 MP4 (CRF 23) for comparison.
| Clip | Two-pass 320 px | Two-pass 480 px | Two-pass 640 px | Single-pass 480 px | MP4 480 px |
|---|---|---|---|---|---|
| Big Buck Bunny (animation, 1080p60) | 2.8 MB | 6.5 MB | 12.0 MB | 2.4 MB | 0.28 MB |
| Jellyfish (natural footage, 1080p30) | 2.7 MB | 5.6 MB | 9.6 MB | 2.7 MB | 0.42 MB |
| UI scroll (screen recording, 720p30) | 1.4 MB | 2.8 MB | 4.7 MB | 1.1 MB | 0.06 MB |
- Size roughly doubles from 10 to 30 fps and from 320 to 480 px. Across all 36 two-pass runs, 30 fps files were 2.3–2.5× the 10 fps files, and 480 px files 2.1–2.3× the 320 px files. Width matters more than the fps menu suggests because GIF stores every pixel of every changed region.
- The size estimate is a measured range. The old formula assumed 16:9 and 0.18 bytes per pixel per frame and read 1.6–3.7× low (480 px, 15 fps, 5 s: about 1.7 MB shown, 2.8–6.5 MB real), and 0 B for Original width. On October 13, 2026 we exported 8 Pexels clips (talking head, ocean, traffic time-lapse, kitchen, dog, laptop typing, forest drone, basketball) and 2 synthetic ones with this tool's exact FFmpeg settings at 320, 480 and 640 px and 10, 15, 24 and 30 fps (180 GIFs). Camera footage needed 0.17–0.92 bytes per pixel per frame in two-pass mode at 15 fps (10th–90th percentile, median 0.67) and 0.04–0.34 in single-pass. The tool now multiplies your width, the video's real height, the frame count and that range, so 480 px, 15 fps, 5 s of 16:9 footage reads about 1.5–8.5 MB, typically 6.2 MB. In Chromium with FFmpeg.wasm a talking-head clip came out at 4.33 MB and a 2.4:1 ocean clip at 5.60 MB (range 1.2–6.4 MB); a detailed drone shot reached 8.70 MB, just over the top. A flat screen-style clip was 4 KB, which is why the range is labelled camera footage.
- Two-pass costs size but buys a lot of quality. Measured against the scaled source, two-pass scored 30.9, 27.0 and 23.8 dB PSNR on the three clips; single-pass (a fixed, image-independent 256-colour palette) scored 20.0, 20.1 and 18.7 dB. Single-pass files are smaller because the coarse fixed palette produces long runs of identical pixels that LZW compresses well.
- An 8 MB budget holds far less than "15 seconds". At 480 px and 15 fps the measured rates were 0.6–1.3 MB per second, so 8 MB is about 6 s of busy animation, 7 s of natural footage or 14 s of a screen recording. Drop to 320 px or 10 fps to roughly halve it.
- If the destination plays video, use MP4. The same clips were 13–47× smaller as H.264. MDN's format guide recommends WebP, AVIF or APNG over GIF for animation sequences where supported; GIF remains the choice when the target only accepts images.
Sources
Checked on .
- FFmpeg filters documentation: palettegen and paletteuse
- W3C: Graphics Interchange Format Version 89a specification
- MDN: Image file type and format guide (GIF, WebP, AVIF, APNG)
- Heckbert, P. S. (1982). Color image quantization for frame buffer display. SIGGRAPH '82 (median cut)
- Celebi, M. E. (2023). Forty years of color quantization: a modern, algorithmic survey. Artificial Intelligence Review
- Blender Foundation: Big Buck Bunny (CC BY 3.0), test clip
- Pexels License (test clips: Brixiv, Coverr, KoolShooters, Mikael Blomkvist, Ming Z, Samed Gojak, Steven Van Elk, cottonbro studio)