Overview
Introduction
This tool crops a uniform border off every edge of a PNG icon entirely in your browser, shrinking the canvas down to just the remaining content.
It's the inverse operation of the Icon Border Adder tool and a focused, icon-labeled wrapper around the site's general-purpose PNG border-removal tool.
What Is Icon Border Remover?
A client-side icon border remover that decodes an uploaded icon's pixel data and copies out the interior region, leaving out a fixed-thickness strip from each of the four edges.
You control the thickness (in pixels) to trim from every side with a single number.
How Icon Border Remover Works
The tool computes a new, smaller output canvas whose width and height are each reduced by twice the given thickness (once for each opposing edge), then copies the corresponding interior pixels from the source icon into it.
If the requested thickness would leave zero or negative width or height, the tool stops and reports an error rather than producing a broken image.
When To Use Icon Border Remover
Use it to strip out a padding strip or frame that was baked into an icon file, to undo a border added by another tool, or to tighten up an icon that has too much dead space around its edges.
It's also handy when preparing icons for a system that expects edge-to-edge artwork with no built-in margin.
Often used alongside Icon Border Adder, Icon Centerer and PNG Rotator.
Features
Advantages
- Runs entirely client-side; your icon is never uploaded to a server.
- Exactly inverts a uniform border added at a known thickness.
- Fails safely with a clear error instead of returning a corrupt or empty image.
Limitations
- Only removes a uniform rectangular strip; it can't detect and remove an irregular, rounded, or partial border automatically.
- If you don't know the exact border thickness, you may need to try a few values or inspect the icon closely first.
Examples
Best Practices & Notes
Best Practices
- Double-check the exact border thickness (in pixels) before cropping — an incorrect value will either leave border remnants or cut into the actual icon artwork.
- Use the PNG Dimensions Finder tool first if you're unsure of the icon's current size.
Developer Notes
This lib file is a thin wrapper: it re-exports the pure removeBorderFromPng function from png-border-remover.ts (the shipped 'PNG Border Remover' tool) under the icon-specific name removeIconBorder, since an icon is just a PNG once uploaded and the cropping math doesn't need to be re-derived for a different subject noun.
Icon Border Remover Use Cases
- Stripping a border that was baked into a downloaded icon set
- Undoing an Icon Border Adder border to get back the original artwork
- Tightening an icon's bounding box before further editing
Common Mistakes
- Entering a thickness larger than half the icon's smallest dimension, which the tool correctly rejects rather than producing a blank image.
- Assuming this can detect border thickness automatically — you must specify it.
Tips
- If you're unsure of the exact thickness, start with a small value and increase it while checking the preview.
- Pair with Icon Border Adder to swap one border thickness or color for another in two steps.