★ Every tool runs 100% in your browser. Nothing is uploaded, ever

Edit GIFs

GIF Trimmer

This free GIF trimmer cuts an animated GIF down to the part you want, right in your browser, with nothing uploaded. Cuts land on real frame boundaries, every kept frame keeps its original delay and looping, and the preview loops exactly the file you will download, so the cut you see is the cut you get.

Trim a GIF down to the part you actually want, or cut a dull stretch out of the middle and keep the head and the tail. You pick the cut on a filmstrip of the real frames, by frame numbers, or by seconds; the tool shows you the exact frame boundaries before you download, and the preview loops only what you are keeping. Everything runs in your browser; your GIF is never uploaded.

Drop a GIF here, or paste one from your clipboard

The built-in sample below is already loaded, so you can try both modes first.

Your GIF & trim settings

Frames are numbered from 1, and both ends are included. In “Keep a section” this is the part that stays; in “Remove the middle” it is the part that gets cut out.

A GIF can only be cut between frames, so a typed time snaps to the nearest real frame boundary. The fields are rewritten with the boundaries actually used, never left pretending.

Honest limits, checked before anything is decoded: files up to 50 MB · up to 600 frames · up to 48 million decoded pixels in total (frames × width × height). A GIF over a limit is refused with the reason, not with a frozen tab. Decoding happens in your browser's memory, and these caps are what a phone can hold.

The kept part, playing

↺ Looping: back to the first kept frame

Stepping pauses the preview and shows one frame at a time: its number, the moment it appears, and how long it stays on screen. The arrow keys step too.

Every frame: click to place the cut

Clicks and drags in the filmstrip set:

Dimmed frames are the ones that will be cut. Clicking a frame also shows it large above, so you can check exactly where the cut falls. After you place the start, clicks place the end.

Two ways to make a GIF shorter

Most trimming is one of two jobs. The first is keeping a section: the good part is one continuous stretch, the middle of a long recording or the last two seconds of a clip, and everything before and after it can go. The second is removing the middle: the start is good, the ending is good, and the dull stretch between them is the problem. Most trimmers only offer the first. This page offers both, in the two modes above, and everything else, the filmstrip, the fields, the preview, works the same in either mode.

How to trim a GIF

  1. Load a GIF. Drop it on the box above, paste it, or pick a file, or try everything on the built-in sample first.
  2. Mark the section. Click frames in the filmstrip (clicks place the start first, then the end; you can also drag), type frame numbers, or type start and end times in seconds. All three stay in sync, and all three work in whole frames. There is no such thing as half a frame in a GIF.
  3. Check the preview. It loops only the part you are keeping, seam included, with the readout confirming how many frames and seconds survive. Step through the boundary frames with the ← → buttons if you want to see exactly where the cut falls.
  4. Download. The trimmed GIF keeps the original dimensions, the original loop setting, and every kept frame's exact original delay.

Removing the middle works the same way: switch the mode, mark the stretch you want gone, and check the preview. It plays the head and the tail joined together, so you can see the join before you commit to it.

Why your cut lands on a frame boundary

A video editor can cut at any millisecond, because video is a stream. A GIF is not a stream. It is a stack of still frames, each with its own delay, and the only places a cut can land are the seams between frames. Those seams are rarely where you would guess, because the delays are uneven. In the sample GIF on this page, the twelve frames are on screen for these stretches:

So if you type 0.25 s to 0.65 s, what should come out? At 0.25 s, frame 4 is already on screen, and cutting it would lose picture you asked to keep, so frame 4 is kept. Frame 7 is still on screen at 0.65 s, so it is kept too. The cut that actually happens spans 0.20 s to 0.65 s, frames 4–7, and the tool rewrites the time fields to say exactly that. Type 0.30 s to 0.50 s instead, where both times land exactly on seams, and you get frame 5 alone, neither neighbour pulled in. The rule is simple and it is the one the tool states: a frame is kept if any part of its time on screen falls inside the range you typed. Tools that silently “round to the next frame” leave you guessing; here the filmstrip dims the cut frames and the readout counts them, so the cut is never a surprise.

A worked example, with real numbers

These figures are from an actual 12-frame test GIF we made for this page: 160 × 120 pixels, 4,407 bytes, uneven delays between 50 and 200 ms, 1.20 seconds per loop, looping forever, the same shape as the built-in sample.

What happens to delays, looping and the first frame

Delays are never touched. A kept frame carries its stored delay into the output unchanged, so the surviving part plays at exactly the pace it did inside the original. Trimming changes which frames play, never how fast. (If you want the pace changed as well, that is the GIF Speed Changer's job.) Looping carries over: a GIF that looped forever trims to a GIF that loops forever, and one set to loop three times still loops three times. Dimensions stay the same: trimming is a cut in time, not a crop.

The one piece of real work is the first kept frame. GIF files save space by storing most frames as small patches over the frames before them, so a frame in the middle of the file may not contain its whole picture. This tool decodes and composites every frame the way a browser plays it, and the trimmed file starts from that complete picture, so a mid-GIF trim never opens with ghost fragments of frames you cut away. The honest cost is size: a complete first frame is bigger than a patch, and the readout warns you before download when a trim starts mid-GIF.

Trim or split: which tool for which job?

Trim when you want one shorter GIF and the rest can be thrown away: this page. Split when you want to keep everything, every frame as a still image, or the animation cut into several clips that together cover the whole thing: that is the GIF Splitter. And if your GIF is the right length but the file is too heavy, neither cutting nor splitting is the fix. You want the Speed Changer to retime it, or a compressor to shrink the bytes. Shortening a GIF and shrinking a GIF are different jobs; this page does the first one properly rather than pretending to do both.

How big a GIF can you trim?

There is no server limit, because there is no server. But your browser's memory is a real limit, so the page states it plainly: files up to 50 MB, up to 600 frames, and up to 48 million decoded pixels in total (frames × width × height). The check runs on the file's structure before a single frame is decoded, so an oversized GIF is refused up front with the reason, not with a frozen tab halfway through.

Frequently asked questions

Why did the trim land slightly off the times I typed?

Because a GIF can only be cut between frames, and its frames are not evenly spaced: each one has its own delay. When a typed time falls inside a frame, that frame is kept, and the tool rewrites the time fields with the actual frame boundaries it used, so you always see the real cut. For an exact cut, use the frame numbers or click the frames in the filmstrip.

Do the kept frames keep their timing and looping?

Yes. Every kept frame is copied with its stored delay unchanged, the dimensions stay the same, and the loop setting carries over. A GIF that looped forever produces a trimmed GIF that loops forever.

What does “Remove the middle” do?

It cuts out the section you mark and joins the head and the tail together. It is the classic fix for a GIF with a good start, a good ending and a dull stretch in between. The two parts keep their original delays, so the join plays at the same pace as the original.

Why is my trimmed file not much smaller, or even bigger?

Two reasons. First, frames are not equal in size: cutting half the frames rarely cuts half the bytes. Second, when the kept section starts mid-GIF, its first frame has to be written as a complete picture. In the original file it may have been a small patch drawn over earlier frames. The readout warns you before download when that applies, and the exact size is shown afterwards.

What is the size limit, and why is there one?

Files up to 50 MB, up to 600 frames, and up to 48 million decoded pixels in total (frames × width × height). Trimming happens in your browser's memory, so those caps are what a phone can hold. The tool checks the file's structure before decoding anything, so an oversized GIF is refused with the reason, not with a frozen tab.

Can I keep just one frame?

Yes. Set the start and the end to the same frame and the download is a one-frame GIF with that frame's delay. If you want that frame as a PNG or JPG instead, the GIF Splitter extracts still frames.

Related tools

Trimming is usually one step in a longer job. These MotionGIF tools cover the steps that tend to come before or after it:

Browse all MotionGIF tools →