What this tool does
This tool makes a GIF smaller by reducing the number of colors it uses. That is a lossy change: every pixel keeps its position and its transparency, but its color is approximated to the nearest color in a smaller palette. Nothing is resized, re-timed or re-ordered.
- It counts every color the frames actually paint.
- It builds a smaller palette — 256, 128 or 64 colors.
- It maps each pixel to the nearest color in that palette. Pixels that already match a palette entry exactly are left alone; the rest get a small ordered dither pattern, which is why smooth gradients stay smooth instead of turning into flat bands.
- It writes a new GIF with the same frames and timings.
What stays the same
For GIFs this version supports, the output keeps:
- the screen size and every frame's rectangle
- the number of frames, their order, and each frame's delay
- each frame's disposal method
- the loop count, and the identifier bytes of the loop block (a file that said ANIMEXTS1.0 still does)
- supported comment blocks and recognized application blocks, kept byte for byte; unsupported block shapes are refused with a reason
- the transparency mask: a pixel that was transparent still is, and one that was not still is not. (The transparent index number itself is recomputed for the new palette, so that number changes.)
- a global color table, so the background color still means something
What changes
- the colors: they are approximated, not preserved. On our fixed sample set (47 files) the P99 color error at the lowest level was 21.2 ΔE00, inside the guard of 25 the output is held to. The engine cannot go below 64 colors at all.
- the palette size: 256, 128 or 64 colors.
- possibly a fine dither texture at the lower levels — that is the trade for smoother gradients.
- the file size: it gets smaller or it does not; see the three results above.
The size target
If you pick a target, the tool starts at the highest quality and steps down only as far as it must, never below 64 colors. Reaching the target is something it tries, not something it promises: some images cannot be brought under 256 KB by reducing colors alone, and it will say so rather than report a result it did not reach.
If your file is already under the target you choose, it is handed back unchanged. There is nothing to gain from re-encoding a file that already fits, and doing it would only cost quality.
How to compress a GIF to 256 KB
- Choose a GIF, or drop one on the page.
- Choose Discord (256 KB) in the target control — the same target the Discord preset button picks.
- Read the three readouts: the level it used, the output size, and the share of the original. The status line says whether the target was reached.
- Download the result, or choose another GIF.
A file that is already under 256 KB is handed back unchanged — there is nothing to gain from re-encoding it. If no level reaches the target, the page reports the smallest size it managed instead of a result it did not reach, and says that reducing colors alone was not enough.
When it says no
Some GIFs are not supported by this version, and it tells you which condition it hit:
- a frame that is not governed by the graphic control block directly before it (E1)
- a plain-text block sitting between a frame and its control block (E1)
- no global color table at all (E2)
- an extension from an application this tool does not recognise (E3)
- a file that ends in the middle of a block (truncated)
Limits of this version
- It does not resize, crop, re-time or change the frame rate. Those are different tools.
- It does not export frames. For the pixels themselves, the GIF frame extractor hands each frame out as a PNG.
- It does not compress without changing colors: there is no lossless mode here.
- It does not work on every GIF — see the list above for the shapes it refuses.
- The numbers on this page come from a fixed set of 47 files we generated and measured, at the three color counts this tool offers. Your GIF will behave differently, and that sample set is not a survey of real-world GIFs.