Why photos turn blotchy in a GIF, and how this avoids it
A GIF frame can only hold 256 colors. A photo has tens of thousands, so every GIF maker has to pick 256 and map each pixel to the nearest one. The question is whose 256. If one set of colors is chosen for the whole animation, a beach photo, a portrait and a sunset all have to share it, and each ends up with only a fraction of the colors it needs. Skin turns into pink patches, a blue sky breaks into bands.
GIF allows every frame to carry its own color table, and this tool uses it: each picture gets the 256 colors that suit it best. We measured the difference on five quite different pictures (three parts of a moorland landscape, a portrait and a color gradient), 640 × 480 each, using PSNR, a standard measure of how close the GIF is to the original (higher is closer):
| Frame | One palette shared by all frames | Own palette per frame |
|---|---|---|
| Sky with clouds | 32.3 dB | 35.1 dB |
| Heather | 31.1 dB | 34.5 dB |
| Sandy path | 31.8 dB | 34.6 dB |
| Portrait | 32.2 dB | 36.9 dB |
| Color gradient | 27.5 dB | 30.2 dB |
| File size (5 frames) | 580 KB | 785 KB |
Every frame improved, the portrait most, and the file grew by about a third. When your frames look alike, as in a short animation drawn on the same background, they need the same colors anyway: choose Smallest file to share one palette and save the space.
The speed you set is the speed you get
GIF stores the time of each frame in hundredths of a second, and browsers do not play very short frames as written. In our test in Chrome, a frame set to 0.01 seconds stayed on screen for 130 to 149 ms, longer than a frame set to 0.05 seconds (80 to 98 ms). A “fast” GIF made of 0.01-second frames actually plays slowly. So this tool never writes a frame shorter than 0.02 seconds, and tells you when a frame had to be lengthened.
Speeds that do not fit hundredths of a second are made by mixing two lengths, so the whole loop keeps the right time:
| You choose | Frame times written | Loop of 12 frames |
|---|---|---|
| 10 frames per second (0.1 s) | 0.10 s each | 1.2 s |
| 15 frames per second | 0.07 and 0.06 s mixed | 0.8 s |
| 24 frames per second | mostly 0.04 s, every few frames 0.05 s | 0.5 s |
| 30 frames per second | 0.03 and 0.04 s mixed | 0.4 s |
| 50 frames per second | 0.02 s each, the fastest a GIF can play | 0.24 s |
| 60 frames per second | 0.02 s each | 0.24 s, not 0.2 s |
Any single frame can have its own time, typed next to it in the list. A title card that stays for two seconds, or a last frame that lingers before the loop starts again, is one number. Play forward, then backward makes a boomerang without adding the pictures twice.
Pictures of different sizes
Every frame of a GIF has the same size, so pictures that differ have to be fitted. The frame takes the shape of your first picture, or the height you type in:
- Fit shows each whole picture and fills the space around it with the background color. Nothing is cut off.
- Fill covers the whole frame and trims what sticks out, so there are no bands, but edges of tall or wide pictures are lost.
- Stretch forces each picture to the frame and changes its proportions. It is only right when the pictures are nearly the same shape already.
Transparent backgrounds
A GIF pixel is either fully clear or fully solid, nothing in between. Transparent PNGs have soft edges made of half-clear pixels, and a GIF maker has to decide what happens to them. If it simply cuts them at a threshold, the edge becomes jagged; if it mixes them with white, the shape gets a pale outline on a dark page. Here, with Keep transparency on (it switches on by itself when your images are transparent), clear areas stay clear and every soft edge pixel is blended onto the background color you choose. In our test of a soft-edged shape blended onto a dark gray, none of its 326 edge pixels came out light.
Good to know
- For small files, keep the width modest. A GIF's size grows with the number of pixels times the number of frames: halving the width makes it roughly four times smaller.
- Dithering scatters dots to fake missing colors. It softens bands in skies and gradients but adds grain and makes the file larger.
- From a video clip, use Video to GIF. To shrink a finished GIF, use Compress GIF, and to turn an animated WebP into a GIF, WebP to GIF.
Your images never leave your device: they are read, resized and turned into a GIF inside this browser tab. There is no sign-up, no watermark and no frame limit other than your device's memory.