Skip to main content

GIF Loop: How to Make a GIF Loop Forever, Once or N Times

GIF loop settings: a loop count of 0 repeats forever, no loop count plays once, and a count of N plays N + 1 times in most browsers. How to set and fix each.

Convert MP4 to GIF

Create GIFs with custom loop settings

MP4 GIF

Tap to choose your file

or

Supports M4A, WAV, FLAC, OGG, AAC, WMA, AIFF, OPUS • Max 100 MB

Encrypted upload via HTTPS. Files auto-deleted within 2 hours.

How to Make a GIF Loop Forever

  1. New GIF from video: convert it in the tool above. Every GIF it makes has loop count 0, so it repeats forever.
  2. Existing GIF: run gifsicle --loopcount=forever input.gif -o output.gif, or use an online loop-count editor and set the count to 0 (infinite).
  3. FFmpeg: add -loop 0 to the GIF output. It is also FFmpeg’s default for GIF.
Stored in the GIF Plays in current browsers How to set it
Loop count 0 Forever FFmpeg -loop 0, gifsicle --loopcount=forever
No loop extension Once FFmpeg -loop -1, gifsicle --no-loopcount
Loop count 1 Twice -loop 1, --loopcount=1
Loop count N N + 1 times -loop N, --loopcount=N

GIF Loop Basics

The GIF format supports configurable loop behavior through the NETSCAPE2.0 Application Extension, added after the original GIF89a specification:

  • Loop count 0: infinite loop (plays forever). This is the default for most GIFs.
  • Loop count 1: one repeat after the first play, so most browsers show the animation twice.
  • Loop count N: N repeats after the first play (N + 1 plays in total). Maximum value is 65,535.
  • No extension: play once. This is the only reliable way to get a single play.

When to Use Each Setting

Loop Setting Use Case Examples
Infinite (0) Continuous animations Social media, memes, web content, messaging
Play once (no loop count) One-shot animations Presentations, tutorials, instructions
2–3 times Attention without annoyance Email marketing, banner ads

Browser Behavior Differences

The loop count is not part of the original GIF89a specification. It comes from a Netscape extension, and apps have interpreted it in different ways:

  • Chrome/Edge: loop count N means the animation plays a total of N+1 times (initial play plus N repeats). So loop=1 plays twice.
  • Firefox: current versions follow the same rule, so loop=1 also plays twice.
  • Safari and other apps: current Safari follows the same rule, but some image viewers and chat apps count N as total plays or ignore the count.

So loop=1 plays twice in current browsers, and possibly once in an older viewer. For a single play everywhere, leave the loop extension out. For infinite looping (loop=0), all browsers behave identically.

Practical tip: If you need exactly-once playback, remove the loop extension (gifsicle --no-loopcount or FFmpeg -loop -1). To make the end feel deliberate, give the last frame a longer delay.

How to Change Loop Count

When Creating a New GIF

In FFmpeg, use the -loop flag:

  • -loop 0 — infinite loop (default)
  • -loop 1 — one repeat (plays twice)
  • -loop 3 — three repeats (plays 4 times)
  • -loop -1 — no loop extension: plays once

Modifying an Existing GIF

Use gifsicle to change the loop count without re-encoding:

  • gifsicle --loopcount=0 input.gif > infinite.gif
  • gifsicle --no-loopcount input.gif > play_once.gif

Loop Count for Email Marketing

For email GIFs, loop count has special importance:

  • Infinite loops are distracting: a constantly moving GIF can annoy subscribers, especially in professional contexts
  • Play 2–3 times: catches attention initially, then stops. Use a loop count of 1 or 2 for that.
  • Older Outlook for Windows ignores loops entirely: it only shows the first frame regardless of loop settings
  • Design for both states: the GIF should look good both while animating and after stopping on the last frame

Why Isn’t My GIF Looping?

  • It has no loop extension or a small loop count. Set the count to 0 with gifsicle or a loop editor.
  • The app turned it into a video. Many social apps convert GIFs to MP4 and use their own loop rules. For Discord, see how to make a Discord GIF that stays under the size limit and loops in chat.
  • Older Outlook for Windows shows only the first frame, so nothing moves at all.
  • It has only one frame. A single-frame GIF is a still image; there is nothing to loop.
  • The loop jumps. If the last frame does not lead into the first, viewers see a cut. Trim where the motion matches, or append the clip reversed (a “boomerang”) with FFmpeg’s reverse filter.

Try Custom Loops

Set infinite, play-once, or custom loop count

MP4 GIF

Tap to choose your file

or

Supports M4A, WAV, FLAC, OGG, AAC, WMA, AIFF, OPUS • Max 100 MB

Frequently Asked Questions

Remove the loop extension: in FFmpeg use -loop -1, in gifsicle --no-loopcount. A loop count of 1 plays twice in most browsers. The converter on this page always makes GIFs that loop forever.

Remove its loop extension with gifsicle: gifsicle --no-loopcount input.gif > output.gif. The GIF then plays once and stops on the last frame.

The loop count comes from a Netscape extension, not the core GIF spec. Current browsers play the first time plus N repeats, but some apps and older viewers count N as total plays or ignore it.

Loop 2–3 times for email. This catches attention without being annoying. Remember that Outlook 2007–2019 for Windows shows only the first frame regardless of loop settings.

Only if the file says so. Most GIFs carry a loop count of 0, which means repeat forever, so they seem to loop automatically. A GIF without a loop extension plays once and stops on its last frame.

Convert the clip with the tool above: the GIF it makes loops forever. For a smooth loop, pick a section where the first and last frames look alike before you convert.

More MP4 to GIF Guides

How to Convert Video to GIF: Complete Guide
Convert MP4, MOV, WebM to GIF online free. Five methods: online converter, FFmpeg, Photoshop, mobile apps, screen recording.
GIF vs MP4: Which Format Should You Use?
GIF vs MP4 compared: file size, quality, browser support, email, Core Web Vitals. When to use each format.
GIF Quality Settings: How to Make Better GIFs
Master GIF settings: FPS, resolution, color palette, dithering. Create high-quality GIFs with optimal file sizes.
How to Reduce GIF File Size: 7 Proven Methods
Shrink GIF files by 50-90%. Resolution, FPS, colors, dithering, and when to switch to MP4 or WebP.
GIF Frame Rate Guide: What FPS Should You Use?
Choose the right GIF frame rate: 5-20 fps recommendations by content type. File size impact and speed control.
GIF Size Limits for Discord, Slack, Twitter & Email
Complete GIF size limits for every platform. Discord 8 MB, Slack emoji 128 KB, Twitter 15 MB, and optimization presets.
Animated GIFs in Email: Best Practices & Size Guide
Email GIF best practices: under 500 KB, Outlook first-frame issue, client support, and optimal settings.
GIF Color Palette: Why 256 Colors Matter
GIF color optimization: palette generation, dithering modes, stats_mode, color count tradeoffs. Make GIFs look better.
How to Make GIFs for Discord: Chat, Emoji & Server Icons
Create Discord GIFs: 8 MB chat limit, 256 KB emoji, animated server icons. Step-by-step with optimization presets.
Animated Formats Compared: GIF vs WebP vs APNG vs MP4
Compare GIF, WebP, APNG, and MP4 for animations. File size, quality, browser support, and decision flowchart.
Back to MP4 to GIF Converter

Request a Feature

0 / 2000