Crop GIF

Crop an animated GIF in your browser with a visual selection box that trims every frame and keeps the loop. Free, private, no upload required.

🌐 Español

Crop GIF works entirely in your browser — upload a GIF above to see its first frame and drag a selection box over exactly the area you want to keep.

🔒 Private by design: everything runs locally in your browser and never uploaded to any server.

Reframing a screen recording without flattening it to one frame

A GIF is not a picture. It is a stack of frames, a color table and a loop flag, and that is precisely why so many “crop” buttons betray it: point a still-image editor at an animated GIF and you frequently get the first frame back with everything after it discarded.

This page exists for the opposite case, where the motion is the entire point. A screen recording that carries a strip of taskbar along the bottom. A wide reaction clip that would make a much better avatar if it were tight on the face. A tutorial capture with a logo sitting in one corner. All of those want the same operation: keep a smaller rectangle, keep every frame, keep the loop.

Even on this site, the neighboring image cropper is not the answer. Its accepted extension list runs .jpg, .jpeg, .png and .webp, so a .gif is rejected before its processing step ever starts, with a message naming the formats it does take. That refusal is honest, and it is the reason this separate GIF page exists at all.

Dragging the box, then reading the selection line beneath it

The first frame is decoded with the browser’s own image decoder, which hands back exactly one frame from a multi-frame GIF without any help from FFmpeg. That frame is drawn onto a preview canvas capped at 420 pixels on its longest edge, with an SVG overlay on top carrying the selection rectangle and four round corner handles.

Under the stage sits a line that reads “Selection”, then a width and height in pixels, then the offset, then the GIF’s real dimensions for comparison. Those are not preview numbers. They are the values that come out of the same scale-then-clamp function the crop step itself runs, so the line is a live preview of the arguments FFmpeg is about to receive.

One rough edge worth knowing: when the preview is a scaled-down copy of a larger GIF, the horizontal and vertical offsets are not forced onto whole numbers, so the offset in that line can arrive with a long decimal tail. The width and height beside it are always whole, and always even.

Cropping a 400 by 300 GIF, start to finish

  1. Use the Upload a GIF to crop file picker. The first frame appears with a centered selection box already on it.
  2. Drag the box body to move it, or a corner handle to resize it. On a 400 by 300 GIF, which is small enough to be previewed at full size, the default box lands as 280 by 210 pixels at offset 60, 45.
  3. Check the Selection line under the preview until the numbers read the way you want them.
  4. Click Crop GIF. A progress percentage appears alongside a Cancel button.
  5. The download starts on its own when the crop finishes. A Download link with the file’s size next to it also stays on screen afterwards, in case your browser blocked the automatic one, and the name gains a -cropped suffix.
  6. Use Choose another GIF to clear the stage and start again with a different file.

Even widths, and the pixels the clamp may take back

Before anything reaches the filter graph, the rectangle passes through a clamp that does three jobs in a fixed order. It pulls the offset back inside the image, then caps the size to whatever room is left from that offset, then rounds the width and height to the nearest even value. Rounding up is preferred, but when rounding up would overshoot the space available it rounds down, so a selection covering an entire 299-pixel-wide frame comes out as 298.

The same clamp runs twice. The widget applies it while you drag, against the preview canvas’s own dimensions, so the box can never be pushed off the stage in the first place, and the scale back up to the GIF’s real pixels happens afterwards. Then the processing step runs a bare probe pass, reads the resolution out of FFmpeg’s own stream dump, and clamps a second time against that. If the probe cannot find a resolution in the log, the crop stops with a message saying it could not read the GIF’s dimensions, and this page shows you that message rather than a generic apology.

The palette pass, and what a crop costs in color

GIF stores at most 256 colors per palette, which is why every GIF encode on this site uses a two-pass approach: one pass builds a palette from the frames, a second maps the frames onto it. The filter graph here puts crop first in the chain, before the split into palette-generation and palette-application branches. That ordering matters. The palette is computed only from the pixels that survive your crop, so those 256 slots are spent on the region you kept instead of being partly wasted on the border you threw away. The loop flag is written as loop-forever.

Be clear-eyed about the cost, though. Changing every frame’s dimensions means a genuine re-encode, and a regenerated palette is not the source palette. Colors can shift, and dithering patterns can change. This is not a lossless trim. If you are chasing file size rather than framing, Compress GIF targets that directly, and GIF Speed Changer rescales each frame’s presentation timestamp instead of touching frame dimensions at all.

When crop-video or a format change is the better page

Reach for Crop Video when the source is an .mp4, .mov, .m4v or .webm. It works differently on purpose: instead of a free-form box, it takes an aspect-ratio choice and computes the largest centered rectangle at that ratio, defaulting to vertical 9:16 for short-form platforms.

If the GIF is going somewhere that accepts video, converting is usually the better trade than cropping. GIF to MP4 escapes the 256-color ceiling entirely, and MP4 to GIF is the route back. The rest of the collection lives on the video tools hub.

Frequently asked questions

Do I get an animation back, or just the first frame?

An animation. The selection box is drawn on the first frame purely because that is the cheapest thing to show you, but the crop itself runs through FFmpeg's crop filter on the whole file, so every frame is trimmed identically and the loop flag is written back as loop-forever. That is the difference between this page and a still-image editor pointed at a GIF.

How large is the preview compared with the real GIF?

The preview is capped at 420 pixels on its longest side. A GIF that already fits inside that on both axes is drawn at its true size, and anything bigger is scaled down just for the on-screen stage. The selection is always converted back into the GIF's own pixel grid before it is handed to FFmpeg, so the downscaled preview never limits the resolution of the result.

Where does the selection box start when I load a file?

Centered, at 70 percent of the preview's width and height. It is only a starting point, not a suggestion about what to keep. Drag the middle of the box to slide it around, drag any of the four round corner handles to resize it, and the box is prevented from leaving the preview area while you do either.

The size under the preview is not exactly what I dragged. What changed it?

The width and height are snapped to even numbers, because several FFmpeg pixel formats reject odd dimensions and the tool takes no chances with them. A 201-pixel-wide selection becomes 202, and a 99-pixel-tall one becomes 100. When rounding up would run past the edge of the image, it rounds down instead, so the crop can never ask for a region that does not exist.

Can I stop a crop that is taking longer than expected?

Yes. While the crop runs you get a percentage read-out and a Cancel button, and Cancel tears down the whole WebAssembly FFmpeg instance rather than politely asking it to stop. There is no partial file to recover afterwards, and the next crop you start simply loads a fresh instance.

Why is the finished file named differently from the one I uploaded?

The result keeps your original base name and gains a cropped suffix before the .gif extension, so party.gif comes back as party-cropped.gif. That is on purpose, so the new file cannot sit in your downloads folder looking identical to the source. A file with no extension at all still picks up both the suffix and the extension.

Related tools