PixelSquishBlog

Why GIFs look grainy: the 256-colour ceiling

2026-09-26

Save a photo as GIF and something goes wrong that no quality slider fixes: skies turn to speckle, gradients develop grain, skin looks printed on newspaper. Nothing malfunctioned. GIF is doing exactly what GIF has always done.

A format with a hard colour budget

GIF dates from 1987, and it carries its era's constraint: each frame may use at most 256 distinct colours, chosen from a palette stored in the file. A modern photo contains hundreds of thousands of distinct colours. To become a GIF, that photo must be rebuilt using 256 — everything else is approximation.

Dithering: the grain is the trick

The naive approach — snap every pixel to its nearest palette colour — produces ugly flat bands across every gradient. The better approach, which our converter uses when writing GIFs, is dithering: the small error left at each pixel is scattered into its neighbours, so the eye blends nearby palette colours back into the missing shade. The speckle you see up close is the dithering — a deliberate trade of grain for banding. We pick the 256 colours by analysing your actual image (median-cut selection), which is why a sunset GIF gets a palette full of oranges rather than a generic rainbow.

When GIF is right, and what to use when it's wrong

Worth repeating from the GIF-stills post: our GIF output is a single frame. Making animations is a video-editing job, not a format-conversion one.

What we deliberately don't do

We don't write GIFs with fewer than the best palette we can build — there is no "smaller GIF" dial that quietly drops to 64 colours. If the file must be smaller, a different format is the honest answer, not a worse GIF.

The short version

No sign-up, nothing uploaded — it runs in this tab.

Convert format →
ToolsBlogAboutContactPrivacyTerms