1. Home
  2. Guides
  3. How to Compress a GIF

How to Compress a GIF Without Ruining It

A GIF gets lighter when it has fewer pixels, fewer frames or fewer colors. This guide shows the changes in the order that costs the least quality, and when to leave GIF behind.

Updated November 2026

What makes a GIF large

A GIF is the sum of its frames, and each frame is a small picture stored with a limited palette and a general-purpose compression method. Three things decide the total weight: how many pixels each frame has, how many frames there are, and how hard the frames are to compress. The third one is easy to overlook. Flat colors and big areas that do not change compress very well. Noise, film grain, camera shake, soft gradients and dithering patterns do not, because almost every pixel differs from its neighbor and from the same pixel in the previous frame.

Knowing this tells you where the savings are. You can reduce the pixels, reduce the frames, make the frames simpler, or, if all else fails, store the animation in a format that is built for motion. The sections below follow that order.

Step 1: Remove what nobody needs

The cheapest saving is the one with no loss in quality: delete what the viewer does not need.

  • Trim the length. Cut the dead time at the start and the end with Cut GIF. Weight is roughly proportional to length, so removing a quarter of the frames removes about a quarter of the file.
  • Crop the edges. If the subject uses only part of the picture, crop to it. Black bars, empty backgrounds and unused margins cost bytes.
  • Delete repeated frames. If the GIF holds the same picture for a long time, the GIF editor can keep one frame and give it a longer delay.

Step 2: Reduce the size

This is the change with the biggest effect, and it is usually the one that hurts the least. The number of pixels in a frame is its width times its height, so the file scales with the square of the change: a GIF that is half as wide and half as tall has a quarter of the pixels. Most GIFs are displayed smaller than their real size anyway. Use Resize GIF and choose the size at which it will be shown. For a chat or a forum post, 320 to 480 pixels wide is usually plenty. Do not enlarge: stretching a small GIF adds bytes and no detail.

Step 3: Lower the frame rate

Many GIFs have more frames than the eye needs. Keeping one of every two or three frames, and lengthening the delay of the remaining ones to keep the speed, can shrink the file a lot with only a slight loss of smoothness. Slow, simple motion survives this well; fast action looks choppy sooner. In the compressor this is the frames option. You can also change the timing with GIF speed, which merges frames that are too fast for browsers to play anyway.

Step 4: Cut the colors

Each frame can have up to 256 colors, but fewer is often enough. Graphics, cartoons and screen recordings often look the same with 64 or 128 colors. Photographs lose their gradients more quickly. Reducing colors makes the palette smaller and the pixel data easier to compress. Try 128 first, then 64, and look at the preview after each step. If you see bands in skies or skin, go back up one step.

Dithering

Dithering mixes dots of nearby colors to imitate shades that are not in the palette. It hides banding, but the dot pattern is noise, and noise is expensive. For flat graphics, turn dithering off. For photos, use the lightest setting that keeps gradients looking smooth. If a GIF is still too large and the dither looks coarse, removing it is one of the quickest ways to save bytes.

Step 5: Use lossy compression

The compressor also offers a lossy setting. In this mode, the encoder is allowed to change a few pixels slightly to make the data more repetitive, which helps the compression method find patterns. The result is a visible grain at high values and almost nothing at low ones, with a saving that can be substantial for GIFs with gradients or noise. Values from 30 to 80 are a good range to try. Check the preview in the part of the picture with the most detail.

Or just use a preset or a target size

You do not have to set everything by hand. The GIF compressor has four presets: light, balanced, strong and smallest. Balanced is a sensible start. If you know a limit, enter it as a target in megabytes, for example 10 MB, and the tool tries stronger settings step by step until the file fits. If it cannot reach the target, it says so, and the next step is to trim, crop or resize first. The limits of common apps are in the guide to GIF sizes. Compression runs in your browser, so the GIF is not uploaded, and you can try different levels as often as you like.

Order matters

The same settings give different results in a different order. Remove frames and crop before you resize, and resize before you compress. Compression works on what is left, so anything you remove first is one less thing to squeeze. Compressing a GIF that is twice as large as it needs to be, only to resize it afterward, wastes quality. Also avoid compressing the same file again and again: each pass can reduce quality further. If you can, always go back to the original file or the original video and make the final version in one pass.

Make GIFs that compress well from the start

  • Use a still camera or screen recording with a stable background. Shaky footage changes every pixel in every frame.
  • Prefer flat colors and clean edges to textures and gradients.
  • Avoid fades, blurs and glows, which turn into banding or noise in 256 colors.
  • Keep it short. A loop of three seconds is almost always enough.
  • Avoid overlaid film grain, noise filters and heavy sharpening before converting.

When to stop using GIF

There is a limit to what compression can do, because the format itself is inefficient for motion. If you have squeezed a GIF as far as you are willing to and it is still too large, change the format:

  • GIF to MP4 gives the smallest file and works on nearly every phone and browser, if the place you are posting accepts video.
  • GIF to WebP keeps the image behavior, with full color and smaller files, for pages and apps that support it.

The guide to GIF vs MP4 vs WebP explains the choice in more detail. If you have the original video, converting from it is better than converting a GIF, because the video still has the colors the GIF lost.

A quick checklist

  1. Trim the length and crop the edges.
  2. Resize to the size where it will be shown.
  3. Lower the frame rate if the motion allows it.
  4. Reduce the colors to 128, then 64, if it still looks good.
  5. Turn dithering off or light for graphics.
  6. Add lossy compression, starting low.
  7. Still too big? Change the format.

Frequently asked questions

What is the quickest way to make a GIF smaller?

Reduce its width and height. File size follows the number of pixels, so halving both dimensions makes each frame about four times lighter.

Does compressing a GIF reduce its quality?

Trimming, cropping and resizing to the displayed size lose nothing that the viewer would see. Fewer colors, no dithering and lossy compression do change the picture, so check the preview and step back if you see grain or bands.

How do I get a GIF under 10 MB?

Trim and resize first. Then open the compressor, choose the 10 MB target and let it find settings that fit.

Is it safe to compress private GIFs online?

On Gifburg, yes: compression runs inside your browser and the file is never sent to our server.

More GIF tools