Auto-crop image borders

Find a bounded content rectangle by comparing every pixel with transparency, the median edge color, or a chosen color, then export it with optional padding.

When this tool is useful

Removing transparent or nearly uniform scanner, screenshot, and product-photo margins while keeping the original source available for comparison.

How local processing works

The browser decodes one static image, classifies every pixel by alpha or bounded RGBA distance from the median edge or chosen background, calculates the non-background bounds, applies padding, and writes PNG.

How to use it

  1. Prepare and preserve the source: Keep an unchanged source, choose one supported static image, and start with conservative settings. Removing transparent or nearly uniform scanner, screenshot, and product-photo margins while keeping the original source available for comparison.
  2. Run the bounded local operation: Process the decoded pixels in this browser; stop and adjust instead of accepting an ambiguous result. The browser decodes one static image, classifies every pixel by alpha or bounded RGBA distance from the median edge or chosen background, calculates the non-background bounds, applies padding, and writes PNG.
  3. Inspect the flattened result: Compare all four output edges with the source at 100%, check thin strokes and shadows near the border, confirm the requested padding and dimensions, and keep the source until the crop is accepted.

Important limitations

This is a color-border heuristic, not object recognition. Subjects touching an edge, shadows, gradients, textured borders, or similar foreground colors can be retained or cut; animation and source metadata are not preserved.

Verify the downloaded result

Compare all four output edges with the source at 100%, check thin strokes and shadows near the border, confirm the requested padding and dimensions, and keep the source until the crop is accepted.

Private by design

Your files stay in this browser. The tool does not upload the source or output to our servers.

Questions and answers

When is this tool useful?

Removing transparent or nearly uniform scanner, screenshot, and product-photo margins while keeping the original source available for comparison.

What does the local operation do?

The browser decodes one static image, classifies every pixel by alpha or bounded RGBA distance from the median edge or chosen background, calculates the non-background bounds, applies padding, and writes PNG.

Which limitations matter?

This is a color-border heuristic, not object recognition. Subjects touching an edge, shadows, gradients, textured borders, or similar foreground colors can be retained or cut; animation and source metadata are not preserved.

How should I verify the result?

Compare all four output edges with the source at 100%, check thin strokes and shadows near the border, confirm the requested padding and dimensions, and keep the source until the crop is accepted.

Related tools