Staaarter

GIF Shrinker

Decodes an animated GIF's frames and shrinks each one by a percentage scale factor (1-100%) using fast nearest-neighbor resampling, then re-encodes the smaller animation. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-29
By Staaarter Team
editortransformanimationgif

Overview

Introduction

Shrinking an animated GIF down, whether to reduce file size or fit a smaller layout, means resampling every frame consistently so the whole animation shrinks together.

This tool decodes each frame, shrinks it by a percentage, and re-encodes a new, smaller animated GIF, entirely in your browser.

What Is GIF Shrinker?

A client-side tool that shrinks every frame of an animated GIF by a chosen percentage scale factor (1-100%), applied to both width and height, using fast nearest-neighbor resampling.

It's the direct inverse of gif-enlarger's percentage mode, sharing the same underlying resampler but restricted to scale-down factors.

How GIF Shrinker Works

For a given scale percentage, the tool multiplies each frame's width and height by that fraction (e.g. 50% halves both dimensions) and resamples down using nearest-neighbor interpolation, which picks the closest corresponding source pixel for each output pixel rather than blending neighbors.

This runs identically per decoded frame, so every re-encoded frame ends up the same, smaller target size.

When To Use GIF Shrinker

Use it to reduce an animated GIF's file size or footprint for a size-constrained platform.

It's also useful for creating a smaller thumbnail-style preview of a larger animation.

Often used alongside GIF Enlarger, GIF Downscaler and GIF Resizer.

Features

Advantages

  • Fast, simple nearest-neighbor resampling with no blending overhead.
  • Applies the same shrink consistently across every frame.
  • Runs entirely client-side; nothing you upload leaves your browser.

Limitations

  • Nearest-neighbor resampling can introduce aliasing (jagged or moire-like artifacts) on large size reductions, since it skips most source pixels rather than averaging them; gif-downscaler avoids this with area-averaging at the cost of more compute.
  • Only shrinks; scale percentages above 100 are rejected (use gif-enlarger instead for that direction).

Examples

Halving a GIF's size

Input

A 400x300 animated GIF, scalePercent = 50

Output

A 200x150 animated GIF with every frame shrunk by half using nearest-neighbor resampling

At 50% scale, both width and height are halved, and each output pixel is filled from its nearest corresponding source pixel.

Best Practices & Notes

Best Practices

  • For large reductions (e.g. shrinking by more than half), compare the result against gif-downscaler's area-averaged output, which often preserves more visual detail.
  • Preview the shrunk animation to confirm important details (like small text) are still legible at the new size.
  • Combine with gif-canvas-size-changer afterward if you need padding or a different aspect ratio beyond a simple scale.

Developer Notes

shrinkGif in gif-shrinker.ts wraps the shared resizeNearest helper applied per decoded GIF frame via transformGifFrames, restricted to scale factors between 0 (exclusive) and 100 (inclusive) percent. It deliberately doesn't share code with gif-downscaler despite both making a GIF smaller, since they use genuinely different resampling algorithms (nearest-neighbor vs. area-average) as documented tradeoffs, not just different parameter ranges of the same function.

GIF Shrinker Use Cases

  • Reducing an animated GIF's file size for a size-constrained upload or platform
  • Creating a smaller thumbnail-style preview of a larger animated GIF
  • Quickly halving or quartering an animation's dimensions for a compact layout

Common Mistakes

  • Shrinking by a large factor and being surprised by jagged/aliased edges; that's an expected nearest-neighbor tradeoff, not a bug, and gif-downscaler is the smoother alternative.
  • Trying to enter a scale percentage above 100, which this tool rejects since it only shrinks (use gif-enlarger for scaling up).

Tips

  • If fine detail or text needs to stay legible after a big size reduction, try gif-downscaler's area-averaging instead.
  • Shrinking first, then cropping, can help keep file size down before any further edits.

References

Frequently Asked Questions