GIF Frame Extractor & Builder
Both directions — pull an animation apart, or assemble one — with a decoder and encoder written for this site.
Frames
Click any frame to download it on its own.
Fewer colours means a smaller file and more banding.
Order
What the gIF Frame Extractor & Builder does
This tool works in both directions, and both halves are unusual in a browser because GIF is a compressed format that browsers can display but not take apart. The decoder and encoder here were written specifically for this site.
Extracting parses the GIF structure, LZW-decompresses each frame, de-interlaces where necessary, and composites frames according to their disposal method — which matters because most GIFs store only the pixels that changed since the previous frame. Naively rendering each frame in isolation gives you a set of fragments; compositing correctly gives you the complete picture at each moment, which is what you actually want. Each frame's own delay is shown, since GIFs frequently vary the timing rather than running at a constant rate.
Building goes the other way. Every source image is drawn to a canvas at your chosen width, then all frames are analysed together to produce a single shared colour palette using median-cut quantisation. That shared palette is important: giving each frame its own would produce visible colour shifts as the animation plays. The frames are then LZW-compressed into a standard GIF89a with a looping extension.
The colour limit is the main quality-versus-size control. GIF supports at most 256 colours in a palette, which is why photographs animate badly and flat graphics animate well. Dropping to 64 colours can halve the file with little visible difference on a screen recording or a diagram, and will produce obvious banding on a sunset.
Ping-pong mode appends the frames in reverse, minus the endpoints, so a short sequence plays out and back without a jarring jump at the loop point.
How to use it
- To extract: drop an animated GIF in and every frame appears, with its individual delay. Click one to save it, or take them all as a ZIP.
- To build: switch tabs, select your images in order, and set the frame delay.
- Lower the colour count if the file is too large — flat graphics tolerate this far better than photographs.
- Press Build GIF. The animation previews in the page and downloads at the same time.
A worked example
A six-frame screen recording exported as PNGs, assembled into a GIF at 400 pixels wide:
| Colours | File size | Appearance |
|---|---|---|
| 256 | 412 KB | Indistinguishable from the source |
| 128 | 287 KB | Indistinguishable on flat UI colours |
| 64 | 198 KB | Slight banding in a gradient header |
| 16 | 96 KB | Heavy banding; text still crisp |
The pattern is worth internalising: a screen recording of an interface has few distinct colours to begin with, so cutting the palette costs almost nothing until you go very low. Run the same test on a photograph and the 64-colour version would be unusable. The other big lever is width — halving it quarters the pixel count and roughly quarters the file.
Frequently asked questions
Why do extracted frames sometimes look like fragments elsewhere?
Because most GIFs store only what changed since the previous frame, and tools that extract frames without compositing show those partial updates. This decoder honours the disposal method and composites each frame onto the previous state, so every frame you see is the complete picture at that moment.
Why is my GIF so large?
GIF compresses well only when there are large areas of flat colour. Photographs and video have neither, so the format is a poor fit. Reduce the width first, then the colour count. For real video, MP4 or WebM is dramatically smaller — GIF is the wrong tool for it.
How many colours should I use?
256 for photographs, though they will still be large. 64–128 for screen recordings, diagrams and interface captures, where the saving is significant and the loss invisible. Below 32 you will see banding on any gradient.
Is my GIF uploaded to be processed?
No. The decoder and encoder are JavaScript files that ship with this page and run on your device. Nothing is transmitted in either direction.