How GIF frame timing works: delays, speed and loop counts
A GIF has no frame rate. Instead, every frame carries its own delay, stored as a whole number of hundredths of a second, and the animation's speed is simply the sum of those delays. That one design decision from 1989 explains why some speeds are impossible, why very fast GIFs play slowly in browsers, and why the GIF speed changer can change speed without touching a single pixel.
Delays in hundredths of a second
The GIF89a specification added a Graphic Control Extension that can precede each image in the file. Among other things it holds the delay time, a two-byte unsigned number of centiseconds (hundredths of a second) to wait before showing the next frame, and the disposal method, which says whether the frame is left in place, cleared to the background or restored to what was there before. Two bytes allow delays up to 65,535 hundredths, nearly 11 minutes, but the smallest step is 10 ms. Because each frame has its own delay, a GIF can hold the first frame for a second, run the middle quickly and pause on the last, which is often better storytelling than one fixed speed.
Which frame rates are possible
With whole hundredths, only certain even speeds exist:
- 2 hundredths: 50 frames per second, the fastest browsers honour;
- 3 hundredths: about 33.3 fps;
- 4 hundredths: 25 fps;
- 5 hundredths: 20 fps;
- 7 hundredths: about 14.3 fps;
- 10 hundredths: 10 fps.
Familiar video rates do not fit. 30 fps needs 3.33 hundredths, 24 fps needs 4.17 and 15 fps needs 6.67, so encoders round. Rounding 6.67 up to 7 makes a "15 fps" GIF play at about 14.3 fps, a few per cent slow; some encoders alternate 7, 7, 6 to average out closer. This is why a GIF converted from video can drift slightly out of step with the original.
Why very fast GIFs play slowly
Browsers do not trust very small delays. In Chrome, Firefox and Safari, a delay of 0 or 1 hundredth of a second is treated as about 100 ms instead. The result is counter-intuitive: a GIF of 20 frames at 1 hundredth each was meant to last 0.2 seconds but plays for two seconds, ten times slower than intended. Frames with no timing information at all get the same treatment. GIF info flags frames under 20 ms and reports the duration browsers will actually show, which is the number that matters when a GIF looks sluggish on one site.
Changing speed without re-encoding
Because timing lives in a few bytes per frame, changing speed does not require decoding or recompressing anything. The speed changer finds each delay value and rewrites it, so the pixels, colours and file size stay exactly the same. A 2ร multiplier halves every delay; 0.5ร doubles it. Results are rounded to whole hundredths, so a 10-hundredth delay at 0.75ร becomes 13, not 13.33. The tool never writes a delay below 2 hundredths, because anything lower would trigger the browser slowdown above. That sets a real ceiling: a GIF already at 2 hundredths per frame cannot be made faster by timing alone; only dropping frames could do it. You can also set one fixed delay for every frame, which evens out a GIF with erratic timing.
How looping is stored
The original GIF format had no idea of looping. Netscape Navigator 2.0 added it through an application extension labelled NETSCAPE2.0, placed near the start of the file, holding a loop count. A count of 0 means loop forever, which is what nearly every animated GIF uses. A count of 2 means repeat twice after the first play in most browsers, so three plays in total. With no extension at all, browsers play the animation once and stop on the last frame. The speed changer can keep the existing setting, loop forever, play two or three times, or play once by removing the extension. Some apps loop every GIF regardless of what the file says.
Checking a GIF
When a GIF misbehaves, look before you edit. GIF info lists every frame's delay, size, position and disposal method, the loop count and the average frame rate, reading only the file's structure. Uneven delays are often intentional; a single huge delay on the last frame is usually a deliberate pause. Remember that many platforms convert uploaded GIFs into video, which can change their timing, and that GIF to video follows the browser's playback rather than the raw numbers. How to make a GIF from photos or a video clip covers choosing a speed when you create one.
Sources and further reading
The claims in this guide rest on these references, which were checked when the guide was last updated. Spotted an error? The contact page says how to report it.