GIF Resizer

Give an animated GIF a new width and height, and get back an animation rather than a still.

Runs on your deviceMoreWorkingNo account needed

What this tool does

There are two ways to state the new size. Percentage moves both sides together, anywhere from 5% up to 400% of what you have now. Exact size takes a width and a height in pixels, up to 4000 a side, and the Keep the aspect ratio checkbox governs how both boxes are read. Left on, a box holding 0 is worked out from the other — a 480 × 360 loop given a width of 240 and a height of 0 comes back at 240 × 180 — and two figures together describe a box the animation is fitted inside. Switched off, the numbers are taken literally: a 0 leaves that side at the size it already was, and two figures stretch the picture to exactly what was typed, which will visibly squash anything with a recognisable shape.

Underneath, the file is taken apart and written again rather than stretched in place. Each frame's compressed data is expanded, its palette applied and its disposal method followed, so an animation stored as small patches over a previous frame is first assembled into the whole picture a viewer would see. Only then is that picture redrawn on a canvas at the target size, with smoothing turned up, and handed to the gif.js encoder running in Web Workers. All of it happens inside this browser tab on your own processor. The GIF is not sent anywhere; the only thing that crosses the network is the encoder script, fetched from this site the first time you run a job, and once the page holds it the work carries on with the connection cut.

Timing and looping come through intact. No frame is dropped, merged or reordered, so a 36-frame loop stays a 36-frame loop, and each frame keeps the delay it had — with one deliberate exception: a delay recorded as 0 or 1 centisecond is written as 100 ms, because that is already what browsers display for those values. The loop instruction is copied as well, so a file with no loop block still plays once, one set to repeat endlessly still does, and one asking for a fixed number of plays keeps that number. Output files take the new width in their name, so demo.gif becomes demo-240px.gif and the copies do not get confused.

Two costs are unavoidable and worth knowing before you commit. First, the rebuild writes every frame whole, each with its own freshly sampled 256-colour palette, so the frame-differencing that made a well-optimised source small is discarded — an animation whose motion only touched one corner of the canvas can come back heavier than it went in, even at half the width. Dithering is off, which leaves banding across gradients and soft shading. Second, enlarging interpolates between the pixels already present rather than adding detail, so a 400% result is bigger and softer, not sharper. Beyond those: a target identical to the current size is refused rather than re-encoded for nothing, results over roughly 4000 × 4000 are rejected, decoding stops past 2,000 frames or 300 million total frame pixels, comment blocks in the source are not carried across, and only GIF goes in and only GIF comes out.

How to use it

  1. Add the GIF. Only .gif files are read, and anything else is turned away by its header bytes rather than failing partway through. Several can be queued at once, and each animation is resized separately under the settings you have chosen.
  2. Scale by percentage, or type exact pixels. Percentage is a single figure between 5 and 400 that moves both sides at once. Exact size takes a width and a height, and with the ratio locked either of them can sit at 0 and be worked out from the other.
  3. Settle the aspect ratio. With Keep the aspect ratio on, a width and height pair is a box to fit inside. Turn it off only when an exact frame size matters more than the proportions.
  4. Choose how many colours to spend. Best colours samples each frame most densely and produces the largest file, Balanced is the default, and Fewer colours reads the pixels sparsely for a rougher, lighter result.
  5. Say what should happen to transparency. Flatten paints see-through pixels onto a background colour, white unless you change it. Keep transparency is an approximation — read the answer below before relying on it.

Processing & privacy

Runs on your device. Your file is processed directly in this browser.

Common use cases

Fitting a demo loop to the column it sits in

A capture recorded at 1440 px wide is displayed at 700 in the documentation. Scaling the GIF dimensions down to what the page actually renders drops bytes no reader was ever seeing.

Meeting a fixed limit on a forum or chat server

Emote and avatar slots often reject anything above a set width. Exact size with the ratio locked lands inside that limit without squashing the picture to fit.

Making a set of animations match

Recordings taken on different displays arrive at four different widths. Add the whole queue, name one width and leave the height at 0, and every file comes back at that width with its own proportions kept.

Trimming an attachment down before sending it

Halving each side leaves a quarter of the pixels to encode, which often clears an attachment ceiling while the motion itself is left completely alone.

Questions

Is my GIF uploaded anywhere?
No. The file is read, redrawn and written back out in this tab, with gif.js encoding through Web Workers on your own machine. That encoder is fetched from this site once; after it has loaded, the network can be switched off and the resize still finishes.
Does the animation actually survive?
Yes, and that is the reason this exists as its own tool. Every frame is kept, the per-frame delays are copied and the loop setting comes with them, so the runtime matches the original. Resize Image decodes only the first frame of a GIF and returns a still picture, which is why it cannot do this job.
Why did the smaller GIF come out bigger?
Because the original was frame-optimised and the rebuild is not. GIF can store a frame as a small patch over the one before it; here every frame is written full-size with a new palette, so a mostly-static animation loses that saving. Fewer colours, or a smaller scale, usually wins it back.
Can I enlarge a GIF without it going soft?
Not with this. Enlarging interpolates between existing pixels, smoothing is always applied, and there is no nearest-neighbour option, so scaling up pixel art will blur its edges instead of keeping them hard. The ceiling is 400% and anything above that is refused.
What becomes of the see-through parts?
By default they are flattened onto the background colour you pick, white to begin with. Keep transparency instead reserves a colour that none of the source palettes use and marks that as the transparent one; since scaling blends that colour into its neighbours, expect a thin fringe around the edges. If all six candidate colours are already in use, it quietly flattens instead.
Why was my size rejected?
Three checks can stop a job before it starts: a target that matches the dimensions the GIF already has, a percentage above 400, and a result larger than about 4000 × 4000. A very large source can also be refused while decoding, past 2,000 frames or 300 million frame pixels in total.
Should I resize this, or compress it?
Resize when the dimensions are the requirement. GIF Compressor when a figure in kilobytes is the requirement, since it can also drop frames and search towards a budget. GIF to MP4 goes far below anything a GIF can reach, and GIF Splitter hands back the frames as separate images.

Related tools

  • Video to GIF — Turn a short clip into an animated GIF.
  • QR Code Generator — Create a QR code for a link, text, Wi-Fi or vCard.
  • GIF Maker — Build an animated GIF from images or a clip.
  • GIF Compressor — Reduce GIF file size by trimming frames and colours.
  • GIF to MP4 — Convert a GIF to a much smaller MP4 video.
  • GIF Splitter — Split an animated GIF into individual frames.