Icon Space Remover

Uploads an icon PNG, decodes it onto an off-screen canvas, scans for the tightest bounding box around its non-transparent pixels, and crops the canvas down to exactly that content, then lets you download the trimmed icon. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-26

Overview

Introduction

This tool automatically trims empty transparent space from around an icon, entirely in your browser, tightening the canvas to exactly the visible content.

It's the same auto-crop operation used by the site's general PNG space remover, applied here to icon-sized assets.

What Is Icon Space Remover?

A client-side icon trimming tool that reads an uploaded icon's pixel data, finds the tightest bounding box around its non-transparent pixels, and produces a new, smaller canvas containing exactly that content.

It's the inverse of the Icon Space Adder: instead of adding a margin, it removes any existing one.

How Icon Space Remover Works

The tool scans every pixel's alpha value to find the minimum and maximum X and Y coordinates that contain any non-fully-transparent pixel, forming a tight bounding box.

It then copies just that region into a new, smaller pixel buffer, discarding the fully-transparent margin outside it.

When To Use Icon Space Remover

Use it when an exported icon has more transparent margin than expected and you need it tightened to the actual artwork before resizing or placing it elsewhere.

It's also useful as a first step before adding a precise, known amount of space back with the Icon Space Adder.

Often used alongside Icon Space Adder and Square Icon Creator.

Features

Advantages

  • Runs entirely client-side; the uploaded icon is never sent to a server.
  • Finds the exact tightest bounding box automatically, with no manual cropping needed.
  • Preserves every remaining pixel's original color and alpha exactly.

Limitations

  • A fully transparent icon can't be trimmed, since there's no content to find a bounding box around.
  • If the icon has stray, barely-visible pixels far from the main artwork, the bounding box will include them, since any non-zero alpha counts as content.

Examples

Trim a wide transparent margin

Input

A 256x256 icon PNG with content only in a centered 100x100 area

Output

A 100x100 PNG containing just the visible content, margin removed

The bounding box scan finds the smallest rectangle covering all non-transparent pixels and crops to it.

Trim an icon with no margin

Input

A 64x64 icon PNG whose content fills the entire canvas

Output

The same 64x64 PNG, unchanged

When the content already touches every edge, there's nothing to trim.

Best Practices & Notes

Best Practices

  • Run this before batch-resizing a set of icons so inconsistent margins don't distort the results.
  • If you need a specific final size, trim first, then add back an exact amount of space with the Icon Space Adder.

Developer Notes

The pure trimming math lives in a lib function that thinly re-exports the shared bounding-box-crop function (also used by the general-purpose PNG space remover) under this icon-specific name, since an icon is just a PNG once uploaded and the underlying scan/crop logic is identical.

Icon Space Remover Use Cases

  • Tightening inconsistent margins across a batch of exported icons
  • Preparing an icon for a platform that expects content to fill the entire canvas
  • Removing accidental extra transparent space from a design export

Common Mistakes

  • Assuming the tool removes semi-transparent glow or shadow pixels around an icon — only fully-transparent pixels are treated as empty.
  • Running this on an icon that's supposed to have deliberate breathing room, which will unexpectedly tighten it.

Tips

  • Combine with the Icon Space Adder to normalize a batch of icons to a consistent margin.
  • Check the result at full size afterward, since even a single stray semi-transparent pixel can prevent trimming on one side.

References

Frequently Asked Questions