Staaarter

GIF Stroke Remover

Uploads an animated GIF and removes a stroke ring from around every frame's silhouette: an outside stroke is cropped back off (reversing the canvas growth), while an inside stroke is eroded back to transparent within the original canvas, then re-encodes and downloads the result. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-29
By Staaarter Team
editorstrokeanimationcanvasgiftransparency

Overview

Introduction

This tool removes a stroke ring from around every frame of an animated GIF, entirely client-side, mirroring whichever placement was used to add it.

It's the direct geometric inverse of the GIF Stroke Adder: outside strokes are cropped away, inside strokes are eroded away.

What Is GIF Stroke Remover?

A client-side GIF stroke-removal tool that, for 'outside' placement, crops `thickness` pixels off every frame's edge (reusing the exact same crop logic as the GIF Border Remover, since a baked-in outside stroke is geometrically identical to a border), and for 'inside' placement, erodes every frame's alpha silhouette inward by `thickness` pixels, clearing whatever was painted there back to transparent.

Unlike the GIF Outline Remover, this tool never inspects pixel color: it only cares about geometry and the transparent/opaque boundary.

How GIF Stroke Remover Works

For outside removal, every frame's pixel buffer is cropped into a smaller canvas offset by the stroke thickness: identical to removeBorderFromFrame.

For inside removal, every originally-opaque pixel within `thickness` pixels of a transparent neighbor (or the canvas edge) is cleared to fully transparent, regardless of its color.

When To Use GIF Stroke Remover

Use it to undo a stroke you previously added with the GIF Stroke Adder, using the same thickness and placement.

It's also useful for removing any known-width ring or border-like margin around a GIF's silhouette when you don't need color-aware detection.

Features

Advantages

  • Precise and predictable when the exact stroke width and placement are known, since it mirrors the adder's own geometry exactly.
  • Doesn't depend on knowing or matching a specific color, unlike the GIF Outline Remover.
  • Runs entirely client-side; the uploaded animation is never sent to a server.

Limitations

  • Purely geometric: it will erode or crop by the requested thickness regardless of whether that's actually where a stroke was drawn, so an incorrect thickness guess can clip real content.
  • Inside-mode removal can't recover original pixel colors that an inside stroke overwrote: that data is genuinely gone once the stroke was baked in.

Examples

Undo an inside stroke

Input

A 128x128 animated GIF with a 4px white inside stroke on every frame, thickness 4, position 'inside'

Output

A 128x128 animated GIF (same size) with the stroke ring eroded back to transparent

Because the stroke was added with inside placement, removal erodes in place rather than cropping the canvas.

Best Practices & Notes

Best Practices

  • Match the placement option exactly to how the stroke was originally added: mismatching outside/inside will crop or erode the wrong region.
  • Double-check the thickness value before removing; an overestimate will eat into real content.
  • Use the GIF Outline Remover instead if you don't know the exact width but do know (or can detect) the stroke's color.

Developer Notes

removeStrokeFromGif in gif-stroke-remover.ts reuses removeBorderFromFrame from gif-border-remover.ts for 'outside' placement (since a baked-in outside stroke is geometrically identical to a border once it's part of the image), and implements its own erodeFrame for 'inside' placement, structurally the same erosion approach as gif-outline-remover.ts's edge-proximity check but without any color comparison.

GIF Stroke Remover Use Cases

  • Undoing a stroke previously added with the GIF Stroke Adder using the same thickness and placement
  • Removing a known-width ring or margin around a GIF's silhouette without needing color detection
  • Preparing a stroked animated asset to be re-stroked in a different color, width, or placement

Common Mistakes

  • Mismatching the placement option (outside vs. inside) relative to how the stroke was actually added.
  • Guessing at the thickness instead of using the exact value the stroke was added with.

Tips

  • If you're unsure of the exact width or the stroke wasn't added with this site's Stroke Adder, try the GIF Outline Remover's color-detection approach instead.
  • Preview the result on a few different frames to confirm nothing was clipped incorrectly.

References

Frequently Asked Questions