PNG Stroke Remover

Uploads a PNG and clears any originally-opaque pixel that lies within the chosen thickness of a transparent pixel or the canvas edge to transparent, shrinking the visible shape inward the same amount a stroke of that thickness would have added. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-26

Overview

Introduction

This tool removes a stroke or outline ring from around a PNG's shape by eroding its alpha silhouette, computed entirely client-side.

It's the inverse of adding a shape-hugging stroke: instead of growing the canvas outward with new color, it clears the outermost ring of the existing shape to transparent.

What Is PNG Stroke Remover?

An erosion tool that checks every opaque pixel for a transparent neighbor (or the canvas edge) within the requested thickness, and clears it to transparent if one is found.

The canvas dimensions never change; only how much of it is visible does.

How PNG Stroke Remover Works

For each opaque source pixel, the tool searches a bounded neighborhood within the chosen thickness for any transparent pixel or the edge of the canvas.

If one is found, that pixel is part of the outer boundary ring and gets cleared to fully transparent; pixels deep enough inside the shape that no boundary lies within range stay untouched.

When To Use PNG Stroke Remover

Use it to strip an unwanted colored outline or border off an icon or sticker asset before re-processing it.

It's also useful for shrinking a shape's visible silhouette slightly, for example to compensate for a stroke that will be added later elsewhere.

Features

Advantages

  • Runs entirely client-side; your image never leaves the browser.
  • Preserves canvas dimensions, so downstream layout math doesn't shift.
  • Works on any shape, not just rectangles.

Limitations

  • Thin details (features narrower than twice the chosen thickness) can be eroded away entirely rather than just having their edge trimmed.
  • Very thick erosion on large images can be slow, since the neighborhood search scales with the square of the thickness.

Examples

Remove a 3px outline

Input

A 100x100 PNG icon with a 3px colored ring around it, thickness 3

Output

A 100x100 PNG with the outer 3px ring cleared to transparent

The icon's core shape remains, minus the outline that used to surround it.

Erode a thin sliver away entirely

Input

A PNG containing a 2px-wide opaque line, thickness 2

Output

A PNG with that line fully erased

A feature narrower than twice the erosion thickness has every pixel within range of a transparent neighbor, so it disappears completely.

Best Practices & Notes

Best Practices

  • Preview the result before downloading; thin shape details can vanish entirely at higher thickness values.
  • Use the same thickness you originally used to add a stroke, for a clean matching removal.

Developer Notes

The pure erosion math lives in a lib function operating on a plain Uint8ClampedArray pixel buffer with no DOM dependency, using a bounded neighborhood search per opaque pixel rather than a full distance-transform, since thickness values in practice stay small; only the surrounding component touches an actual <canvas> element.

PNG Stroke Remover Use Cases

  • Stripping an unwanted colored outline off an icon
  • Shrinking a shape's silhouette before adding a different effect
  • Cleaning up a sticker asset that has excess border baked in

Common Mistakes

  • Choosing a thickness larger than half the width of thin shape details, which erases them instead of just trimming their edge.
  • Expecting the canvas to shrink — erosion only changes which pixels are visible, not the image's dimensions.

Tips

  • Check the transparency checker tool afterward to confirm how much of the image ended up transparent.
  • If a shape disappears entirely, try a smaller thickness value.

References

Frequently Asked Questions