Skip to main content
Back to BlogUtility Guides

How to Convert Video to GIF (and Why the File Gets Bigger and Uglier)

GIF is limited to 256 colors and has no inter-frame compression, which is why your 2 MB video becomes an 8 MB GIF that looks worse. Learn the format's constraints, the frame-rate sweet spot, and when to use something else.

The Toolbox TeamAugust 13, 20268 min read

The problem: your 2 MB video becomes an 8 MB GIF that looks worse

The GIF format was designed in 1987 for static images and got animation bolted on two years later. It stores each frame as a complete, independently compressed picture using LZW — a lossless dictionary coder that works well on flat-color graphics with repeated patterns. Video codecs like H.264 and VP9 store only the differences between frames, which is why a 30-second MP4 is 3 MB and the GIF of the same clip is 15 MB. The GIF is ten times larger because it's carrying five to ten times more pixel data, and it looks worse because it's only allowed 256 colors per frame.

That's the trade-off: GIF is universally compatible — it plays in every browser, email client, and chat tool without a codec — but you pay for that compatibility in file size and color depth. Understanding the two constraints (256 colors, no inter-frame compression) is the whole skill of making good GIFs.

Fastest path

Open the Video to GIF Converter, upload a clip, set start and end times, pick a frame rate and width, and download. For a 5-second clip at 320px wide and 10 fps, you get a GIF under 2 MB that looks acceptable in a chat window. For anything longer or bigger, read on — the defaults exist because of the format's constraints, not because the tool is lazy.

The two constraints that determine everything

Constraint 1: 256 colors maximum

A GIF color table holds exactly 256 entries. Each pixel in each frame is an index into that table — an 8-bit number pointing at one of 256 RGB triples. Your source video has 16.7 million colors (24-bit). The conversion collapses that to 256, and the way those 256 are chosen determines whether the result looks okay or looks like a 1995 website.

The tool uses a 216-color "web-safe" palette — a 6×6×6 cube where each color channel takes one of six values (0, 51, 102, 153, 204, 255). The remaining 40 palette slots are padding. This palette was designed in the 1990s for monitors that couldn't display more than 256 colors simultaneously, and it's the reason GIFs of video have visible banding in gradients — skies, skin tones, shadows. A smooth orange-to-red sunset in the video becomes five distinct orange/red bands in the GIF because the palette only has six steps per channel.

Professional tools (ffmpeg's palettegen + paletteuse filters) solve this by generating a custom 256-color palette from the actual frames, using a median-cut algorithm that places more colors where the video needs them. A custom palette of a sunset GIF would have 30 shades of orange and red, no greens or blues at all. The tool uses the fixed web-safe palette because it's fast and runs in the browser without a WASM encoder — but if you need broadcast quality, run ffmpeg locally:

ffmpeg -i input.mp4 -vf "fps=10,scale=480:-1,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" output.gif

That one-liner generates a per-clip palette and applies it, producing a GIF that looks dramatically better than any fixed-palette converter at the same resolution.

Constraint 2: no inter-frame compression

Every frame in a GIF is a complete image. There is no keyframe, no delta encoding, no motion compensation. A 480×270 GIF at 15 fps for 10 seconds stores 150 full frames, each with 129,600 pixels. The same clip as an H.264 MP4 stores one full frame and 149 frames that contain only the pixels that changed — typically 5 to 20% of the frame. That's why the MP4 is 1.5 MB and the GIF is 12 MB.

This is also why the tool caps at 30 seconds and 640 pixels wide. The cap isn't arbitrary — it's the point where the GIF file becomes too large to be useful. A 640×360 GIF at 15 fps for 30 seconds is 450 frames × 230,400 pixels = 103.7 million pixels of data. Even with decent LZW compression (maybe 0.4 bytes per pixel), that's a 40 MB file. Nobody's going to load that in a Slack message.

The settings that matter

Frame rate. 10 fps is the sweet spot for most content. At 5 fps, motion looks strobe-like — a person walking appears to teleport between positions. At 15 fps, motion is smooth but the file is 50% larger than 10 fps for the same clip, and the improvement is barely perceptible for the short loops GIF is used for. Reserve 15 fps for content with fast, small motions (sports clips, gameplay) where the strobe effect at lower rates is visible. The tool's three options (5, 10, 15) cover the useful range.

Width. 320px is the right default for chat and social embeds — it's the display width of most messaging apps. 480px is the floor for blog posts where the GIF is the main content. 640px is for full-width web display, and it doubles the file size of 320px. Going above 640px in a browser-based tool means encoding times measured in minutes and files measured in tens of megabytes.

Duration. Keep it under 5 seconds if possible. The file size scales linearly with duration — a 10-second GIF is twice the size of a 5-second one at the same settings. The tool's 30-second cap is a ceiling, not a recommendation. For a reaction GIF, 2 to 3 seconds is plenty. For a tutorial clip, 10 seconds is usually enough to show one action.

When GIF is the wrong format

GIF is the right choice when you need universal playback — email, Slack, Discord, old CMS platforms that don't support video embeds. It's the wrong choice when:

  • The clip is longer than 15 seconds. An MP4 at the same visual quality will be 5 to 10 times smaller. Use a video embed.
  • The content has smooth gradients. Skies, skin, fog, shadows — the 256-color limit produces visible banding that makes the GIF look broken. An MP4 preserves these perfectly.
  • You care about file size. A WebP animation supports 24-bit color and inter-frame compression, producing files 60 to 80% smaller than GIF at the same quality. Modern browsers support it; only older email clients and some chat tools don't.
  • You need transparency. GIF supports 1-bit transparency (a pixel is either fully transparent or fully opaque), which produces jagged edges. WebP supports 8-bit alpha, giving you smooth semi-transparent edges.

Gotchas

  • The web-safe palette has no grays. The six values per channel (0, 51, 102, 153, 204, 255) produce 6 × 6 × 6 = 216 colors, but the gray ramp is just six steps: 0, 51, 102, 153, 204, 255. A black-and-white video converted to GIF will show visible stepping in mid-tones. If your content is mostly grayscale, a custom palette makes a bigger difference than usual.
  • Disposal method matters for overlays. The tool uses disposal method 0 (unspecified, meaning the viewer replaces the area with the background). If you're building GIFs manually with per-frame transparency, disposal 1 (do not dispose) or disposal 2 (restore to background) changes whether previous frames show through. The tool doesn't expose this — it's a fixed setting.
  • LZW dictionary resets at 4,096 codes. The GIF spec limits LZW codes to 12 bits (4,096 entries). When the dictionary fills, the encoder sends a clear code and starts over. For highly textured frames (noise, film grain), the dictionary fills before covering much of the frame, and compression efficiency drops. This is why noisy video compresses badly as GIF — the noise defeats the dictionary.
  • The 30-second cap is about your browser, not the format. The tool processes everything client-side. A 30-second clip at 640px and 15 fps means the browser holds 450 full-resolution canvas frames in memory, runs LZW on each one, and assembles the result. Past that, you hit memory limits and the tab freezes. A server-side tool (ffmpeg) has no such cap, but then your video leaves your machine.
  • Re-encoding a GIF degrades it further. If you take a GIF that already has 256 colors and re-encode it through a different tool with a different palette, you quantize twice. The second pass maps the first palette's 256 colors to the second palette's 256 colors, and you lose whichever colors don't overlap. Edit the source video, not the GIF.

Summary

  • GIF's 256-color limit and lack of inter-frame compression are the two reasons your video gets bigger and uglier when converted. There is no setting that fixes this — it's the format.
  • Use 10 fps and 320px wide for chat and social. Use 15 fps and 480px for blog content. Keep clips under 10 seconds.
  • A fixed web-safe palette produces banding in gradients. For production quality, use ffmpeg with palettegen and paletteuse to generate a custom 256-color palette per clip.
  • GIF is the right format when you need universal playback (email, chat, old CMS). It's the wrong format for long clips, smooth gradients, or when file size matters — use MP4 or animated WebP instead.
  • Convert your clips at the Video to GIF Converter for browser-based, private processing. For the companion jobs, Video Thumbnail Extractor grabs a still frame, Screen Recorder captures the clip in the first place, and Image Resizer handles the static-image sizing.