GIF Cropper

Image

Crop animated GIFs to a specific area with a visual selection box that keeps the animation. Drag a selection box lock the ratio if needed while loops Drag.

Drop GIF to crop

No file chosen

About GIF Cropper

This GIF cropper crops animated GIFs to a specific region locally in your browser while preserving every frame. The process uses a gif.js decoder to split the animation into per-frame bitmaps, the Canvas 2D API to extract and redraw each frame within the selected crop rectangle, and finally re-encodes everything into GIF89a, keeping each frame's delay, playback speed and transparent background intact. You set the crop region via a visual draggable selection box or type in exact x, y, width and height pixel values, and watch a live preview of the looping result before exporting. Because cropping only extracts the chosen area of each frame without re-quantizing colors or recompressing, image quality matches the original exactly — it never degrades. It is a handy way to shave plain white margins, isolate a key action, or resize a landscape meme into a square or 9:16 portrait for sticker platforms. Files never leave your device, so private or licensed animations are safe to process. Cropping must apply one region to every frame, the essential difference from a still image. Aligning each frame to its own content lets relative positions drift and the animation jitters, while a fixed box preserves the original motion. Decide the region with every frame in view rather than looking at the first alone. Cropping changes how effective inter-frame differencing is, and so the size. Content that changed in a small area may lose its reference or have the changed region pushed to the edge after cropping, defeating differencing and inflating the file. Compare size before and after; a marked increase means the crop broke the encoding structure and the region needs rethinking. Transparent areas usually need refilling after a crop. Space formerly held outside the canvas becomes visible blankness that flickers or shows as a translucent block. With assets carrying alpha, confirm whether the cropped result should be padded with an edge-adjacent colour instead of left empty. The palette may need rebuilding, depending on the implementation. A tool recomputing colours from the new picture can be more accurate than before, while reusing the old palette can introduce fresh banding. Zoom into gradients and shadows afterwards to confirm no stepping appeared from remapping. Finally, preserve metadata such as looping and delay. Cropping changes dimensions and should not alter tempo, yet some tools reset the loop count or delay when re-encoding. Play the export in a real environment to confirm the rhythm matches, rather than checking only that the first frame looks right. For social platforms the dimensions also need to match the target aspect. Square feeds, vertical short video and wide landscapes impose entirely different composition on one clip, and cropping a wide shot to vertical usually cuts the subject. Rather than cropping repeatedly, fix the target ratio first and reframe at the source for reusable material instead of offcuts. In batch cropping, consistency beats per-item perfection. Tuning every asset to its own content makes a set look ragged when played together, while one fixed box looks tidier even if an individual frame has more margin. Fix the parameters first — size, ratio, margin rule — apply them, and handle exceptions separately rather than nudging each item.

How It Works Internally

Cropping changes the visible area only and does not re-encode what is unaffected, so it is lossless provided the output is not compressed again. Every frame of an animation must receive the same crop rectangle or the picture jitters, and cropping can also remove the very region that made compression efficient, so the file may grow because inter-frame differences shrink.

InputCropping 20% from all sides of an animation
OutputApply one rectangle to every frame; if large static regions were removed the inter-frame differences grow and the file may grow too

Measured on This Page

Fixed: worker loaded from a CDNThe gif.js worker pointed at cdnjs.cloudflare.com, so on an offline or restricted network rendering never finished and the page sat at 'Cropping...' forever; it also contacted a third party, contradicting the local-processing claim. The worker source is now bundled with ?raw and wrapped in a Blob URL at runtime (the same approach as pdfjs)
Crop appliedA 100x60 crop produced a 100x60 result matching the inputs, finishing within a second after the fix
Frames preservedThe output still carries 3 frames — a crop re-encodes each frame without changing the count
Default boxThe crop box defaults to the full 240x180 image, so cropping untouched values simply re-encodes

The finding is worth recording on its own: a worker script fetched from an external CDN is a silent availability defect. It works perfectly on a normal network — precisely why testing rarely catches it — while on an intranet, offline, or behind a blocked CDN the user watches 'Cropping...' until giving up, with no error and nothing to diagnose. The same class of problem existed elsewhere on this site (the PDF.js worker is now inlined too), and the test is simple: a script the core feature depends on must not come from a third-party host. Two usage notes: GIF is a lossy 256-colour format, so re-encoding after a crop degrades colours slightly; and frame delays are inherited, since this page does not edit the timeline.

How this was measured: A 3-frame 240x180 GIF was generated, uploaded, the crop box set to 100x60 (x=40, y=30) and crop pressed; the preview image's real pixel size and frame count were read back. Measured before and after the fix. · Measured 2026-10-31

How to Use

  1. Open "GIF Cropper"
  2. Drop a GIF, or click "Choose GIF" to upload one
  3. Enter the X/Y offset and the crop width and height
  4. Click "Crop GIF" and wait for the re-encode
  5. Check the preview, then click "Download" to save

Use Cases

  • Remove excess margins — Crop white or black borders around GIF animations so content fills the entire frame.
  • Extract a region — Crop a local area from a panoramic GIF to focus on key actions or expressions.
  • Adjust composition — Crop GIFs to specific aspect ratios to meet social media platform video size requirements.
  • Meme cropping — Crop landscape GIFs to square or portrait format, adapting to WeChat sticker size specs.
  • Remove watermark area — Crop corner watermark areas from GIFs, keeping clean animation subject content.

FAQ

Does cropping lose frames?

No. The tool crops each frame individually and preserves the original frame delay info; the cropped GIF has the same frame count and playback speed as the original.

How is the crop region set?

Via a visual draggable selection box, or by entering precise x, y, width and height pixel values for pixel-exact cropping.

Does cropping reduce GIF quality?

No. Cropping only extracts the specified region of each frame without color re-quantization or compression; image quality matches the original.

Can I crop to a specific aspect ratio?

Yes. Enter specific width and height values for proportional cropping, e.g. a 1:1 square or 9:16 portrait.

Is transparency preserved?

Yes. GIF supports transparency, and per-frame cropping keeps the original alpha information, ideal for animations cut out of their background.

Are files uploaded?

No. All decoding, cropping and encoding run locally in your browser via gif.js and the Canvas API, so files never leave your device.

The cropped GIF stops animating or has one frame?

The crop region must cover the changing area; if it only contains static background the export can collapse to a single frame. Confirm the full time range is selected and something actually changes inside the box, and preview before saving.

Black edges or ghosting appear after cropping the GIF?

GIF stores inter-frame differences, so changing the crop can expose remnants of earlier frames. The tool recomputes frames but extreme cases may leave traces. Expanding the crop box a few pixels or re-running a palette reduction usually clears it.