GIF Compressor
: Compress animated GIFs to a smaller file or a target size such as Discord's upload limit: fewer colours, smaller scale, fewer frames, animation kept, no uploadOptions
GIF Compressor
Make an animated GIF smaller without turning it into a video: the tool rewrites the GIF with one shared palette and only the pixels that change in each frame, and can go on to fewer colours, a smaller size or fewer frames until it fits a target size you type, such as Discord's upload limit. Your browser decodes and writes the GIF in this tab, so the file is not uploaded, and it stays an animated GIF with its timing, loop count and transparency.
How to compress a GIF
- Press
Open filesor drop one or more GIFs on the page;Add filesadds more.Examplemakes a small animated GIF and compresses it. - To fit a limit, type a
Target sizesuch as500 KBor20 MB. Leave it empty to just rewrite the GIF at the settings you choose. - Choose the
Colours(256, 128, 64, 32 or 16), theScale %(100 keeps the size),Keep frames(all, every 2nd or every 3rd) andDither. With a target size these are the settings the search starts from and never goes above. - Each GIF starts as soon as it is added, and again when you change a setting. The row shows the frame counter and, with a target, which settings are being tried;
Cancelstops it. - When it is done the compressed GIF plays in the results list with its old and new size, the percentage saved, its size, frames and colours, and what the target search changed. Download one, or
Download allfor several as a ZIP. A filecat.gifis saved ascat-compressed.gif.
Example
How a target size is read and the settings the search walks through, from the tool's own functions. Each line is a target size; the search starts from 256 colours, 100% size, all frames, tries at most six of these steps, and stops at the first one that fits.
20 MB
256 KB
1.5 mb
10 KB20 MB → 20 MB (20,971,520 bytes); first steps: 128 colours | 64 colours | 64 colours, 90% size | 64 colours, 75% size …; last: 16 colours, 40% size, every 3rd frame
256 KB → 256 KB (262,144 bytes); first steps: 128 colours | 64 colours | 64 colours, 90% size | 64 colours, 75% size …; last: 16 colours, 40% size, every 3rd frame
1.5 mb → 1.5 MB (1,572,864 bytes); first steps: 128 colours | 64 colours | 64 colours, 90% size | 64 colours, 75% size …; last: 16 colours, 40% size, every 3rd frame
10 KB → 10 KB (10,240 bytes); first steps: 128 colours | 64 colours | 64 colours, 90% size | 64 colours, 75% size …; last: 16 colours, 40% size, every 3rd frameDetails
- A real run: the
ExampleGIF is 320 × 200 with 24 frames and is about 142 KB, written the plain way, every frame whole with its own palette. At the default settings it comes out at about 27 KB, around 81% smaller, with no setting changed. With aTarget sizeof10 KBthe search reached 9.3 KB in 3 tries, at 64 colours and 50% size. - Why a GIF is so big: it stores every frame as a picture, each with its own colour table, and compresses each one alone. Most animations change only a small part of the picture from one frame to the next, so most of those bytes repeat what is already on screen.
- Lossless first. All frames share one palette, built from pixels sampled across the whole GIF. When the GIF uses 255 colours or fewer, those exact colours are kept and nothing is lost; with more, the palette is reduced to the
Coloursyou pick. Each frame is then compared with what is already showing: unchanged pixels become transparent, and the frame is cropped to the box that changed. Identical frames in a row become one longer frame. - Timing, loop count and transparency are kept. Frame delays stay as they were, except that a delay of 0 or 1 hundredth of a second is written as 10, because browsers play those at 10 anyway; dropping frames adds the delays of the dropped frames to the one kept, so the GIF lasts as long as before.
Coloursis the palette size, 256 down to 16; fewer colours make a smaller file and show banding in gradients and photos, whereDitheradds a fine dot pattern instead of bands and makes the file a bit larger.Scale %shrinks the width and height together (50 keeps a quarter of the pixels).Keep frameskeeps every 2nd or 3rd frame, which makes the motion choppier.- The target size search: with a
Target size, the tool encodes your settings first and, if the result is too big, tries the next less damaging step, estimating each step's size from the real sizes so far. It lowers colours first (128, then 64), then the scale (90 down to 40%), then the frames (every 2nd, then 3rd), and 32 and 16 colours only at the end. It never goes above the colours, size or frames you chose, tries at most six times and keeps the first result that fits. The row says what it changed, for examplefits 10 KB at 64 colours, 50% size. - Discord limits, as of December 2026: a free account can upload 20 MB per file (it was 10 MB from September 2024, so many pages still say 8 or 10 MB), and a custom emoji must be under 256 KB. Type
20 MBor256 KBas the Target size. Discord's limits change; the figures come from its support articles, read on 2026-12-03.
Limits
- The compression is lossless re-encoding plus the reductions you choose. There is no lossy LZW (the gifsicle-style trick of allowing small colour errors so the data compresses better), so on a very detailed GIF a target size can need more cuts than a tool with it.
- A GIF that is already optimised may not shrink, and the output can be larger than the original. The row then shows a warning with both sizes; the result is still offered, but keep the original.
- If no step fits the target, the row says so and gives the smallest result tried, with the settings it ended at. Try a smaller
Scale %orKeep frames. A target under 1 KB is refused. - Only GIF files are accepted: a file that is not a GIF, or one that is cut short, gets a message (a cut short GIF keeps the frames it has). Video, WebP and APNG animations are not read; Video to GIF makes a GIF from a video.
- There is no file size cap set by the site. The real limit is memory: a GIF file over 2 GB cannot be held by a browser, and a very large picture size can run out of memory, in which case the tool says so. Frames are decoded one at a time, so long GIFs are fine; they just take longer.
FAQ
How do I compress a GIF without losing quality?
Leave Colours at 256, Scale % at 100 and Keep frames at All, and press nothing else: the frame-difference rewrite alone often shrinks a screen recording or simple animation by half or more. A GIF with 255 colours or fewer keeps every colour exactly; one with more is reduced to a shared 256-colour palette.
Why is my GIF so big?
Each frame is stored as a whole picture, so size grows with frames times pixels. A 3 second clip at 15 frames a second is 45 pictures. Cut the frames or the Scale %, or use fewer colours; the Example GIF went from about 142 KB to about 27 KB just by storing only what changes.
How do I make a GIF under 20 MB or small enough for Discord?
Type 20 MB as the Target size (or 256 KB for an emoji). The tool lowers colours, then size, then frames only as far as needed and tells you what it changed. As of December 2026 Discord's free upload limit is 20 MB.
Is my GIF uploaded, and is there a size limit?
No: your browser reads the GIF and writes the new one in this tab, so nothing is sent anywhere. The site sets no size limit; the limit is your device's memory, and the page says so if a GIF is too big for it.
What is the difference between lossy and lossless GIF compression?
Lossless rewrites the GIF so the picture is the same: shared palette, only changed pixels, merged duplicate frames. Lossy changes the picture to save space: fewer colours, a smaller size, fewer frames. This tool does the lossless part always and the lossy part only as you set it or as a target size needs. Lossy LZW is not implemented.
Runs entirely in your browser. Nothing is uploaded.