Convertio.com

GIF Loop Settings: Infinite, Play Once & Custom

GIF loop behavior is controlled by a simple number stored in the NETSCAPE2.0 application extension block. Set it to 0 for infinite looping, 1 for play-once, or any value up to 65,535 for custom loop counts. This guide explains how looping works, browser behavior differences, and practical recommendations.

Convert MP4 to GIF

Create GIFs with custom loop settings

MP4GIF

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.

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: play once and stop on the last frame.
  • Loop count N: play N times then stop. Maximum value is 65,535.
  • No extension: technically means play once, but behavior varies by viewer.

When to Use Each Setting

Loop SettingUse CaseExamples
Infinite (0)Continuous animationsSocial media, memes, web content, messaging
Play once (1)One-shot animationsPresentations, tutorials, instructions
2–3 timesAttention without annoyanceEmail marketing, banner ads

Browser Behavior Differences

The GIF specification's loop count interpretation is ambiguous, and browsers handle it differently:

  • 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: loop count N means the animation plays exactly N times total. So loop=1 plays once.
  • Safari: similar to Firefox — N means N total plays.

This inconsistency means loop=1 plays either once or twice depending on the browser. For truly "play once" behavior that works everywhere, the safest approach is to test in your target browsers. For infinite looping (loop=0), all browsers behave identically.

Practical tip: If you need exactly-once playback, consider using loop=0 (infinite) with a longer pause on the last frame. This way the GIF appears to stop naturally while technically still looping.

How to Change Loop Count

When Creating a New GIF

In FFmpeg, use the -loop flag:

  • -loop 0 — infinite loop (default)
  • -loop 1 — play once
  • -loop 3 — play 3 times
  • -loop -1 — no loop (omit NETSCAPE extension entirely)

Modifying an Existing GIF

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

  • gifsicle --loopcount=0 input.gif > infinite.gif
  • gifsicle --loopcount=1 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. The subscriber can re-trigger by scrolling away and back.
  • Outlook ignores loops entirely: 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

Try Custom Loops

Set infinite, play-once, or custom loop count

MP4GIF

Tap to choose your file

or

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

Frequently Asked Questions

Set the loop count to 1 in your GIF creator. In FFmpeg, use -loop 1. In our converter, change the loop setting from "Infinite" to "Play Once."

Set loop count to 1 (play once) or use gifsicle on an existing GIF: gifsicle --loopcount=1 input.gif > output.gif. Note that browser behavior varies.

The GIF spec's loop count interpretation is ambiguous. Some browsers count the initial play plus N repeats, others count total plays as N. This is a known inconsistency.

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

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