GIF of GIFs
Combine multiple GIF animations into a single animated GIF grid. Upload GIFs, arrange in a layout, and export a synchronized composite GIF.
Drop GIF files here or click to browse
Up to 9 GIFs, max 5 MB each
About
Combining multiple animated GIFs into a single composite file requires frame-level synchronization. Each source GIF may have a different frame count (n), frame delay (d), and canvas size. This tool decodes every source GIF to its raw frames, computes a synchronized timeline using the least common multiple of frame counts, composites each frame onto a grid layout at the target resolution, then re-encodes the result as a valid GIF89a file with LZW compression. Getting the timing wrong produces jarring stutters. Getting the palette wrong produces color banding. A naive approach of screen-recording a browser window yields lossy artifacts and uncontrolled file sizes. This tool operates at the binary level: it reads and writes the GIF specification directly. Note: output is limited to 256 colors per the GIF specification. Source GIFs with vastly different palettes will undergo median-cut quantization, which may shift subtle gradients.
Formulas
The total number of output frames is determined by synchronizing all source GIFs so each completes full cycles:
where ni is the frame count of the i-th source GIF and k is the total number of source GIFs. The output frame delay is the minimum delay across sources, clamped to the browser floor:
The output canvas dimensions for a grid of c columns and r rows with padding p and cell size s:
where s is computed from the user-specified cell pixel size. LZW compression operates on a dictionary of pixel index sequences, starting from initial code size m = max(2, ceil(log2(colors))). The clear code is 2m and EOI code is 2m + 1.
Reference Data
| Parameter | GIF87a | GIF89a | Notes |
|---|---|---|---|
| Max Colors | 256 | 256 | Per frame (local color table) |
| Transparency | No | Yes | Via Graphic Control Extension |
| Animation | No | Yes | Multiple image blocks + GCE |
| Loop Control | N/A | Netscape Extension | 0 = infinite loop |
| Min Frame Delay | N/A | 10ms | Browsers clamp to ~20ms |
| LZW Min Code Size | 2 - 8 | 2 - 8 | Matches color table bit depth |
| Max Image Dimension | 65535px | 65535px | Spec limit; practical ~4000px |
| Disposal Method 0 | N/A | Unspecified | No action required |
| Disposal Method 1 | N/A | Do Not Dispose | Frame persists |
| Disposal Method 2 | N/A | Restore to BG | Clear to background color |
| Disposal Method 3 | N/A | Restore to Previous | Restore canvas state |
| Interlacing | Yes | Yes | 4-pass Adam7-like scheme |
| Typical Web Delay | N/A | 100ms | 10 FPS common default |
| Header Bytes | 6 | 6 | GIF87a / GIF89a |
| Logical Screen Desc. | 7 bytes | 7 bytes | Width, Height, flags, BG, aspect |
| Trailer Byte | 0x3B | 0x3B | Marks end of data stream |