Offline GIF Editor

How to Put Two GIFs Side by Side, Stack, or Merge Into One Loop

How to merge two animated GIFs with different resolutions, frame counts, and frame delays without breaking playback speed — covering dual-clock resampling, sub-20 ms sliver coalescing, and Side-by-Side, Top-Bottom, Sequential, and Before-After Wipe layouts.

Put Two GIFs Side by Side or Merge Clips Offline

Automatic dual-clock timing sync, 4 layouts (Side by side, Top & bottom, Join clips, Before/After wipe), optional A/B badges, and zero watermarks.

Open Merge GIFs Studio

Direct Answer: Combining Two GIFs Without Breaking Frame Timing

Putting two animated GIFs side by side, stacked top-to-bottom, joined sequentially, or swept in a Before-After wipe breaks in basic editors for one technical reason: GIF89a allows only one single delay value per output frame, yet your two input GIFs almost always have different dimensions, different total lengths, and unsynchronized per-frame delays.

In Merge GIFs, the local compositor solves all three mismatches automatically — normalizing canvas boxes with Fit & pad, Fill & crop, or Match first clip, merging both timelines onto a unified millisecond clock, and coalescing sub-20 ms timing slivers so browsers never throttle playback into slow motion. Everything runs in browser memory with zero server uploads and zero watermarks.

Choosing Among the 4 Real Merge Layouts

Layout Mode Input Count Built-In Controls Best Real-World Use Case
Side by side (Horizontal 2-Up) Exactly 2 clips 0–16 px divider gap, A / B pill badges, 3 timing sync modes Comparing two UI flows, shader tweaks, model outputs, or paired reaction GIFs on desktop
Top & bottom (Vertical 2-Up) Exactly 2 clips 0–16 px divider gap, A / B pill badges, 3 timing sync modes Mobile feeds (9:16 or 4:5) where side-by-side columns look too tiny on 390 px screens
Join clips (Sequential) 2–8 clips Cut, Crossfade, Wipe left/right, Fade black/white (3–8 frames) Multi-scene compilations, step-by-step demos, or chaining reaction punchlines
Before / after wipe Exactly 2 clips (or 2 stills) Boomerang cosine-eased or One-way sweeping divider + Before / After tags Design redesigns, photo grading comparisons, compression tests, and Use Original as Clip A diffs

The Hard Engineering Problem: Desynced Clocks & the 20 ms Sliver Bug

Suppose Clip A advances every 60 ms (0, 60, 120, 180, 240, 300 ms) and Clip B advances every 70 ms (0, 70, 140, 210, 280 ms).

If you naively take the exact mathematical union of both event clocks, the combined output timestamps become: 0 → 60 → 70 → 120 → 140 → 180 → 210 → 240 → 280 → 300 ms.

Look at the interval between 60 ms and 70 ms: it is a 10 ms sliver frame!

Here is what happens when a naive merger writes that 10 ms frame into a GIF89a Graphic Control Extension:

  • Chrome (Blink GIF image decoder), Firefox (Mozilla Bug #125137), and Safari/WebKit all clamp delays <= 10 ms back up to 100 ms!
  • Every 10 ms sliver silently expands by 10× into a 100 ms stutter, turning a snappy 1-second side-by-side clip into a jerky 1.8-second crawl.

How Unified Clock Resampling + Sliver Coalescing Fixes It

Our timedPairs compositor in Merge GIFs walks the merged event boundaries with a strict >= 20 ms minimum display floor:

  1. At each output frame start t, it applies every frame update due at or before t from both Clip A and Clip B.
  2. It schedules the next boundary at max(t + 20 ms, next_event), and if fewer than 20 ms remain before the clip's total duration, extends that last frame cleanly to the end instead of emitting a tiny tail sliver.
  3. Because every output delay stays >= 20 ms, all desktop and mobile browsers honor the exact written timing with zero slow-motion clamping.

Solving Mismatched Loop Lengths: 3 Sync Strategies

When Clip A lasts 1.2 s and Clip B lasts 2.4 s, pick the Timing mode that fits your story:

Timing Sync Mode Output Duration Behavior on Shorter Clip When to Use
Loop shorter clip (default) max(A, B) (2.4 s) Repeats Clip A continuously until Clip B finishes Best default when both clips are looping animations or reactions
Stretch to match max(A, B) (2.4 s) Scales Clip A's frame delays proportionally (× 2.0) Ideal when Clip A and Clip B show the same action captured at different speeds
Trim to shorter min(A, B) (1.2 s) Cuts Clip B cleanly when Clip A ends Best when Clip B has trailing dead time you do not need

Step-by-Step: Put Two GIFs Side by Side Without Losing Sharpness

  1. Open Merge GIFs and Drop Clip A: Load your first GIF (or animated WebP, APNG, PNG, or JPEG). For an instant diff of an edit you just made in the studio, click Use Original as Clip A — the studio automatically sets your untouched original as Clip A and your edited animation as Clip B.
  2. Choose Your Layout Card: Click Side by side, Top & bottom, Before / after wipe, or Join clips, then select your second file under Add comparison clip (or up to 8 files in Join clips mode).
  3. Tune Timing & Layout Details:
    • Pick Timing (Loop shorter clip, Stretch to match, or Trim to shorter) — or pick a Transition (Cut, Crossfade, Wipe left, Wipe right, Fade through black, Fade through white) for sequential joins.
    • Expand Layout details to set Canvas fit (Fit & pad, Fill & crop, or Match first clip), Divider gap (0–16 px), Matte color or Transparent padding, and custom Clip A / Clip B labels (such as v1 / v2 or Raw / Fixed).
  4. Build, Scale & Optimize: Click Merge clips (or Create animated wipe). Notice that placing two 640 px GIFs side by side creates a 1,280 px wide canvas; before exporting, switch to Resize GIF to bring combined width down to 720–960 px (or 600 px for newsletters) and run a light pass in GIF Compressor to tame the dual-scene 256-color budget.

Avoiding Palette Flicker on Dual-Scene Composites

Because both halves of a Side-by-Side GIF share a single 256-color table per frame, placing a saturated outdoor sunset next to a high-contrast dark UI dashboard forces each half to live on ~128 colors. Two quick tricks keep both sides crisp:

  • Prefer Wipe or Cut Over Crossfade in Sequential Joins: Crossfade frames blend two palettes together for 4–6 frames, briefly doubling color demand. A crisp 4-frame Wipe or Cut lets each scene claim all 256 colors cleanly.
  • Export Heavy 2-Up Comparisons as MP4: If your side-by-side demo is headed for X, LinkedIn, or a blog post and shows subtle gradients, bounce the merged composite straight to 24-bit video in GIF to MP4 Converter.

Sources & Primary References

All GIF89a timing fields, browser frame-delay clamping mechanics, and pixel compositing standards in this guide reference official primary documentation (verified November 2026):

  1. CompuServe GIF89a Specification (W3C Archive) (Logical Screen Descriptor, Graphic Control Extension centisecond delays, and per-frame Local Color Tables): https://www.w3.org/Graphics/GIF/spec-gif89a.txt
  2. Chromium Blink Source — gif_image_decoder.cc (browser GIF frame-delay decoding and clamping behavior in Chromium): https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/renderer/platform/image-decoders/gif/gif_image_decoder.cc
  3. Mozilla Bugzilla #125137 — Minimum GIF frame delay throttling in Gecko (historical rationale for browser minimum animation frame intervals): https://bugzilla.mozilla.org/show_bug.cgi?id=125137
  4. MDN Web Docs — Canvas API (local RGBA ImageData compositing and bilinear pixel resampling): https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API
  5. Gifsicle Official Manual (Eddie Kohler — -O3 frame-delta optimization and --colors quantization for multi-scene animations): https://www.lcdf.org/gifsicle/man.html

Frequently Asked Questions

Why does one side play at the wrong speed when I put two GIFs side by side?

Naive GIF joiners pair Frame 1 with Frame 1 and Frame 2 with Frame 2 using only Clip A's delay table. If Clip A runs at 100 ms (10 fps) and Clip B runs at 50 ms (20 fps), naive pairing cuts Clip B's speed in half. A proper compositor builds a unified millisecond clock that advances each side independently whenever its own frame boundary arrives.

What happens if my two GIFs have different lengths, like 1.5 seconds and 3.0 seconds?

In Merge GIFs, choose one of three Timing sync modes: Loop shorter clip (repeats the 1.5 s clip twice so both finish smoothly at 3.0 s), Stretch to match (scales the shorter clip's delays proportionally to 3.0 s), or Trim to shorter (stops the combined loop cleanly at 1.5 s).

How do I put two GIFs side by side when one is wider or taller than the other?

Open Layout details in Merge GIFs and select Canvas fit: Fit & pad scales each clip proportionally inside matching cells with a custom matte color or transparent padding; Fill & crop fills both halves edge-to-edge by center-cropping overflow; Match first clip locks cell dimensions to Clip A automatically.

Why did my combined side-by-side GIF play in slow motion in Chrome or Safari?

When two clips have slightly offset frame delays (for example 60 ms and 70 ms), merging their raw change timestamps creates tiny 10 ms sliver frames. Because Chrome, Safari, and Firefox clamp any GIF delay of 10 ms or less back up to 100 ms, those slivers stretch playback into slow motion. Coalescing boundaries into a 20 ms minimum interval prevents the slowdown completely.

Can I create an animated Before-After wipe slider between two GIFs or screenshots?

Yes. Choose the Before / after wipe layout in Merge GIFs, drop Clip A and Clip B (or click Use Original as Clip A to compare your current edit against the original file), pick Boomerang or One-way sweep, customize Before/After labels, and export locally with zero watermark.

Open Offline GIF Studio