User Rating 0.0
Total Usage 0 times
Drop a GIF here or click to upload Max 20 MB · GIF87a / GIF89a
Is this tool helpful?

Your feedback helps us improve.

About

GIF animation length depends on two factors: the number of frames (N) and the per-frame delay (d), measured in hundredths of a second. Total duration equals N × d. Modifying either variable changes perceived length. This tool parses the raw GIF89a binary, extracts every Graphic Control Extension block, and lets you trim frame ranges or uniformly scale delay values. No server upload occurs. Processing runs entirely in your browser via a Web Worker performing LZW decompression and recompression.

Incorrect delay manipulation can produce GIFs that stutter or exceed platform file-size limits. Some frames carry local color tables or use disposal methods that, if stripped, cause visual artifacts. This tool preserves disposal flags and local palettes during re-encoding. Note: the GIF specification caps per-frame delay at 655.35 s. Extremely large files (>20 MB) or GIFs exceeding 1000 frames may cause memory pressure in constrained environments.

gif editor gif trimmer gif speed change gif length gif cutter resize gif duration gif tool

Formulas

The total duration of a GIF animation is computed from the sum of all individual frame delays:

T = Ni=1 di

Where T = total duration in hundredths of a second, N = total number of frames, di = delay of the i-th frame in hundredths of a second (stored as a 16-bit unsigned little-endian integer in the Graphic Control Extension block).

When changing speed by a factor s, each frame delay is scaled:

di = round(dis)

Where s > 1 speeds up (shorter delays), s < 1 slows down (longer delays). The minimum clamped delay is 2 (= 20 ms) because most browsers treat 0 or 1 as ~100 ms. Maximum is 65535 (655.35 s).

When trimming, the output contains frames from index a to b (inclusive), producing b a + 1 frames. The new duration becomes:

T = bi=a di

Reference Data

PlatformMax GIF SizeMax DurationMax DimensionsRecommended FPSNotes
Twitter/X15 MB140 s1280×1080 px10 - 15Auto-converts to MP4
Discord8 MB (free) / 50 MB (Nitro)No limitNo limit15 - 25Avatar GIFs: 10 MB
Slack20 MBNo limitNo limit10 - 20Large GIFs preview poorly
Reddit20 MB60 s1280×720 px10 - 15Converted to MP4 on upload
Tumblr10 MBNo limit540 px wide10 - 15Resized if wider
GIPHY100 MB15 s recommended720 px wide15 - 24Optimized on ingest
Facebook8 MBNo limitNo limit10 - 15Only via GIPHY integration
iMessage5 MBNo limitNo limit10 - 15Larger GIFs sent as files
WhatsApp16 MBNo limitNo limit10 - 15Auto-compressed
LinkedIn5 MBNo limitNo limit10GIFs in comments only
Email (General)1 - 3 MB<6 s600 px wide8 - 12Some clients block animation
GIF87a SpecNo limitNo limit65535×65535 pxN/ANo animation support
GIF89a SpecNo limitMax delay: 655.35 s/frame65535×65535 pxUp to 100Supports transparency & animation
Photoshop ExportNo limitNo limit30000×30000 px15 - 30Save for Web (Legacy)

Frequently Asked Questions

The GIF specification allows frame delays as low as 0 (= 0 ms), but most browsers clamp delays below 2 (= 20 ms) to approximately 100 ms. This tool enforces a minimum delay of 20 ms per frame to ensure consistent playback across Chrome, Firefox, and Safari.
Disposal method 3 ('restore to previous') tells the renderer to revert to the canvas state before the current frame was drawn. If you trim the beginning of a GIF, the first trimmed frame might reference a state that no longer exists. This tool automatically changes the first frame's disposal method to 1 ('do not dispose') to prevent rendering artifacts.
GIF compression relies on LZW encoding, which is dictionary-based. When frames are re-encoded independently, the new LZW stream may not achieve the same compression ratio as the original, especially if the original used cross-frame optimizations (delta encoding). For minimal size increase, avoid re-encoding when only adjusting speed - this tool modifies delay bytes in-place for speed-only changes.
Each frame can have a local color table of up to 256 colors (8-bit indexed). The global color table also holds up to 256 entries. Different frames can use different local tables, so the total unique colors across the entire animation can exceed 256, but never within a single frame.
Yes. The timeline displays each frame with its individual delay value. You can click any frame, modify its delay, and the change applies only to that frame. This is useful for creating pause effects (high delay on one frame) or acceleration sequences.
Negligibly. The loop count is stored in the Netscape Application Extension block as a single 16-bit value. Changing it from infinite (0) to a fixed count alters only 2 bytes in the output.
This tool preserves the transparent color index from each frame's Graphic Control Extension. If a frame declares index 7 as transparent, that mapping is maintained in the re-encoded output. No transparency data is lost during processing.