How to Crop a GIF: 5 Free Ways (Mac, Online & Command Line)

By Hieu Dinh

How to Crop a GIF: 5 Free Ways (Mac, Online & Command Line)

You have a GIF that's almost perfect, but there's a chunk of dead space around the edges — a black bar, a watermark, an awkward margin, or a window chrome you'd rather not show. So you open Preview on your Mac, draw a selection, hit crop, and export. The result? A single frozen frame. The animation is gone. That's the moment most people start searching for how to crop a GIF properly.

Cropping a GIF sounds like it should be simple, and it is — but only if you use a tool that understands animation. The wrong tool flattens every frame into one still image. The right one trims the frame of every frame at once and keeps the loop intact. This guide walks through five free, reliable ways to crop a GIF on macOS, in the browser, and from the command line — and explains exactly what cropping is (and isn't) so you pick the right method the first time.

What "Cropping" a GIF Actually Means

Before you crop anything, it's worth getting the vocabulary straight, because three very different operations get lumped together and the wrong one will ruin your file.

  • Cropping means cutting the edges of the frame — changing the visible area and, usually, the aspect ratio. You're keeping the full duration and every frame, but trimming off the outer pixels. Think of it like using scissors on the border of a photo. This is what this guide covers.
  • Trimming (or "cutting") means removing frames from the start or end to shorten the duration. The frame size stays the same; the GIF just plays for less time.
  • Resizing (or "scaling") means shrinking or enlarging the whole image proportionally. A 600×400 GIF becomes 300×200 — same content, smaller dimensions.

So when you crop a GIF, you're cutting the edges off the picture while preserving the animation and length. If you accidentally resize when you meant to crop, you'll squash the whole thing instead of trimming it. Keep that distinction in mind and the rest is easy.

Why Crop a GIF?

Cropping is one of the most common GIF edits, and for good reason. A few situations where it's the right move:

  • Remove dead space. Screen recordings and exported GIFs often capture more than you need — toolbars, cursors, empty margins. Cropping focuses attention on the part that matters.
  • Strip out a watermark or logo. If the watermark sits in a corner, a crop can remove it cleanly without re-exporting the source.
  • Change the aspect ratio. Maybe you need a square GIF for a profile, a 16:9 clip for a slide, or a vertical crop for a story. Cropping reshapes the frame to fit.
  • Shrink the file size. This is the underrated benefit. Fewer pixels per frame means a smaller file. Cropping away 30% of the frame can meaningfully cut the byte count — a great first step before you reduce the GIF file size further.
  • Reframe the subject. Center an off-center subject, cut out a distracting background element, or tighten the composition.

Whatever the reason, the goal is the same: cut the frame, keep the motion.

A Warning First: Don't Use Mac Preview

If you're on a Mac, your instinct is to reach for Preview — it's free, it's already there, and it can crop images. The problem is that Preview does not understand animated GIFs. When you open a GIF in Preview, it shows you the frames as a vertical list of separate images. If you select all, crop, and save, Preview either flattens the GIF into a single static frame or breaks the animation entirely.

In short: Mac Preview cannot crop animated GIFs while preserving the animation. Don't waste time trying. The five methods below all keep the loop intact. Use one of them instead.

Method 1: ezgif.com (Free, Online, No Install)

For a quick one-off crop, ezgif.com is the easiest option. It's a free, browser-based GIF toolkit that runs on any operating system — no account, no download, no app to install. It's the same kind of tool you'd reach for to compress a GIF online, and it has a dedicated crop tool.

How to crop a GIF on ezgif:

  1. Go to ezgif.com and choose the Crop tool (or upload your GIF and switch to the Crop tab).
  2. Upload your file. The free uploader accepts GIFs up to 200 MB, which covers all but the largest animations.
  3. Drag the crop box over the area you want to keep. You can grab the handles to resize the selection, or drag the whole box to reposition it.
  4. For pixel-perfect control, enter exact width, height, and position (x/y) values in the boxes below the preview. This is handy when you need a specific aspect ratio like 1:1 or 16:9 — ezgif has aspect-ratio presets too.
  5. Click Crop image!, preview the result, and download the cropped GIF.

ezgif keeps the animation intact and is genuinely fast for small-to-medium files. The trade-offs: your GIF is uploaded to a third-party server (skip it for anything confidential), and large files are limited by your upload speed. For private or batch work, use one of the offline methods below.

Method 2: FFmpeg Crop Filter (Free, Command Line, Most Precise)

If you're comfortable with a terminal, FFmpeg is the most precise and scriptable way to crop a GIF — and it never uploads your file anywhere. Install it on macOS via Homebrew:

brew install ffmpeg

Then crop with the crop video filter:

ffmpeg -i input.gif -vf "crop=w:h:x:y" output.gif

The four values in crop=w:h:x:y are what make this work, so let's break them down:

  • w — the width of the cropped output, in pixels.
  • h — the height of the cropped output, in pixels.
  • x — the horizontal offset: how many pixels from the left edge the crop box starts.
  • y — the vertical offset: how many pixels from the top edge the crop box starts.

So to crop a 500×500 region starting 100 pixels from the left and 50 pixels from the top:

ffmpeg -i input.gif -vf "crop=500:500:100:50" output.gif

A few practical tips:

  • To crop from the center, you can use FFmpeg's built-in expressions. For example, a centered 400×400 crop: crop=400:400:(in_w-400)/2:(in_h-400)/2.
  • If you omit x and y, FFmpeg centers the crop automatically: crop=400:400.
  • Run ffmpeg -i input.gif by itself first to see the source dimensions, so your width and height never exceed the original frame.

FFmpeg processes every frame of the GIF identically, so the animation is always preserved. It's also trivial to batch: wrap the command in a shell loop and crop a whole folder at once. The same crop filter works on video too — see our guide on how to crop a video with FFmpeg for the full breakdown.

Method 3: Photoshop (Frame-by-Frame Editing)

If you already own Photoshop, it has full GIF support through its timeline — you just have to open the file correctly so it imports as animation rather than a single layer.

How to crop a GIF in Photoshop:

  1. Open Photoshop and go to File → Import → Video Frames to Layers — or simply File → Open the GIF, which loads each frame onto its own layer with the animation timeline at the bottom.
  2. Open the Window → Timeline panel if it isn't already visible, so you can confirm the frames are intact.
  3. Select the Crop tool (C), draw your crop box over the canvas, and adjust the handles. Photoshop applies the crop across the entire canvas, so every frame is cropped together.
  4. Press Enter to commit the crop.
  5. Export with File → Export → Save for Web (Legacy), set the format to GIF, confirm Looping Options is set to Forever, and save.

The key step is Save for Web (Legacy) — a regular "Save As" won't produce an animated GIF. Photoshop gives you fine control over color reduction and dithering during export, which can help quality, but it's overkill if all you need is a crop. Reach for it when you're already doing other frame edits.

Method 4: GIMP (Free, Open-Source Alternative to Photoshop)

Don't have Photoshop? GIMP is a free, open-source image editor that runs on macOS, Windows, and Linux, and it handles animated GIFs frame by frame.

How to crop a GIF in GIMP:

  1. Open the GIF in GIMP with File → Open. Each frame loads as a separate layer.
  2. Go to Image → Canvas Size, or use the Crop tool from the toolbox to draw your selection.
  3. If you use the Crop tool, make sure the option to crop all layers (not just the active one) is enabled, so every frame is trimmed together.
  4. After cropping, flatten if needed and confirm the canvas size reflects your new dimensions.
  5. Export with File → Export As, give the file a .gif extension, and in the export dialog check As animation and Loop forever.

The one thing to watch in GIMP is making sure the crop applies to all layers — if it only crops the active layer, the other frames keep their original size and the animation breaks. As long as you crop all layers and export "as animation," GIMP produces a clean cropped GIF for free.

Method 5: Mac App Store Apps (Native, Drag-and-Drop)

If you'd rather stay out of the terminal and don't want to upload files, a dedicated native Mac app is the most pleasant option. Claquette is a well-regarded GIF and screen-recording app on the Mac App Store that includes cropping alongside trimming and resizing, with a live preview and drag handles. Other Mac GIF editors offer similar crop tools.

Native apps win on convenience: drag-and-drop, instant preview, no upload, and a UI built specifically for GIFs. The trade-off is that many of them are paid (often a small one-time purchase). If you crop GIFs regularly and value a smooth workflow over a free price tag, a native app is worth it. If you crop one GIF a month, ezgif or FFmpeg will do the job for free.

After You Crop: Compress the Result With Compresto

Here's something most crop tutorials skip: cropping a GIF can make the file bigger, not smaller. Re-saving through an online tool or editor often re-encodes the GIF with a fresh color palette and dithering, and the output can balloon well past the original — sometimes doubling in size even though you cut pixels away.

That's where Compresto comes in. To be clear, Compresto is a compressor, not a cropper — it doesn't trim frames. But it's the perfect second step. Once you've cropped your GIF with any of the methods above, drop the result onto Compresto and it shrinks the file dramatically — often by 50–80% — while keeping the animation smooth and the quality high.

Compresto is a native macOS app, so everything runs locally on your Mac: nothing is uploaded to a server, which matters for client work, screen recordings, and anything you'd rather keep private. It handles batches, so you can compress a whole folder of cropped GIFs at once, and it works on videos, images, and PDFs too. This "edit first, compress after" pattern is the standard way to keep GIFs sharp and small.

If a small, shareable GIF is your end goal, see our guide to the best GIF compressor for Mac and our overview of how a good GIF compressor works.

Download Compresto free for macOS and shrink your cropped GIFs in seconds.

Frequently Asked Questions

How do I crop a GIF for free?

The fastest free way is ezgif.com's online crop tool — upload your GIF (up to 200 MB), drag the crop box or enter exact pixel dimensions, and download. For an offline free option, use FFmpeg with ffmpeg -i input.gif -vf "crop=w:h:x:y" output.gif, or the free, open-source GIMP editor. All three preserve the animation.

Can I crop a GIF on Mac?

Yes, but not with Preview — Preview flattens animated GIFs into a single frame. Instead, use ezgif.com in your browser, FFmpeg from the Terminal (brew install ffmpeg), GIMP, or a native Mac App Store app like Claquette. All of these keep the GIF animated after cropping.

Does cropping a GIF reduce quality?

Cropping itself doesn't reduce quality — you're keeping the original pixels inside the crop box untouched. However, re-saving the GIF can introduce minor quality loss because the tool may rebuild the color palette. To minimize this, use a precise tool like FFmpeg, and if the re-saved file grows in size, run it through a compressor like Compresto to bring the size back down without visible quality loss.

How do I crop a GIF without losing the animation?

Use a tool that processes every frame, not Mac Preview. ezgif.com, FFmpeg's crop filter, Photoshop (opened with the timeline), and GIMP (cropping all layers) all crop the full frame stack and keep the loop intact. The most common mistake is cropping only the active layer/frame — make sure your tool applies the crop to all frames.

What's the best free GIF cropper?

For most people, ezgif.com is the best free GIF cropper because it requires no install and offers both drag-to-crop and exact pixel input. If you want precision, scripting, or to avoid uploading files, FFmpeg is the best free command-line option. For a full desktop editor, GIMP is the best free GUI alternative to Photoshop.

Is cropping the same as resizing a GIF?

No. Cropping cuts the edges off the frame and changes the visible area (and often the aspect ratio), while keeping the original pixel density. Resizing scales the entire image up or down proportionally without removing any content. If you want to make a GIF smaller in dimensions but keep everything in view, resize. If you want to cut out part of the frame, crop.

Conclusion

Cropping a GIF is straightforward once you avoid the one trap that catches everyone — Mac Preview, which flattens the animation. For a quick browser crop, ezgif.com is hard to beat. For precision and privacy, FFmpeg's crop=w:h:x:y filter does the job in one line and never uploads your file. Photoshop and GIMP cover full frame-by-frame editing, and a native Mac app gives you the smoothest drag-and-drop experience if you crop often.

Whichever method you choose, remember the final step: a freshly cropped GIF can come out larger than you expect. Compresto is the fastest way to shrink it back down — locally on your Mac, in batches, with the animation fully intact.

Download Compresto for macOS and turn your cropped GIFs into small, shareable files in seconds. You can also explore how to convert a video to GIF if you're creating GIFs from scratch.

Ready to compress your files? Join thousands of creators using Compresto ⚡