---
title: "Trim Transparent PNG: Auto-Crop Empty Borders – PNGMender"
description: "Auto-crop transparent or solid-colour borders from PNGs with an alpha threshold, then add padding, square the canvas and centre the image. Batch and ZIP."
url: https://pngmender.me/trim-transparent-png/
---

Auto-crop · pad · square

# Trim transparent PNG

Crop away the empty transparent space around icons, stickers, cut-outs and renders, then pad them evenly or centre them on a square canvas.

Cropped in this tab. Nothing is uploaded.

## How trimming works

The trimmer scans each image for the smallest rectangle that holds every visible pixel and crops to it. In **Transparent** mode a pixel is empty when its alpha is at or below the threshold; in **Uniform colour** mode it is empty when it is within the tolerance of the colour in the top-left corner, which suits scans and exports on white.

After the crop, **padding** adds the same margin on every side (transparent, or the border colour in uniform-colour mode). **Square canvas** then extends the shorter side, and the position setting decides where the image sits: centred for app icons and avatars, bottom-aligned for product shots that should share a baseline.

Every file in the batch uses the same settings, and changing a setting re-trims them all. The preview marks the crop with a dashed box over the original.

### Tips

- Soft drop shadows fade out slowly; an alpha threshold of 10–30 trims the nearly invisible fringe without cutting the visible shadow.
- For sprite sheets and icons, keep the threshold at 0 so no partially transparent edge pixel is lost.
- Photos and JPEGs have noisy borders; use uniform-colour mode with a tolerance of 8 or more.
- Need the background gone first? Use [Make PNG transparent](https://pngmender.me/make-png-transparent/), then trim the result.

## Questions

**Does trimming reduce quality?**

No. The kept pixels are copied exactly and saved as a lossless PNG. Only the empty border is removed or added.

**Why did nothing get trimmed?**

Something touches the edge: often a nearly invisible pixel or a faint shadow. Raise the alpha threshold a little, or in uniform-colour mode raise the tolerance.

**What happens to a completely empty image?**

If no pixel passes the threshold there is nothing to keep, so the file is reported as empty and left out of the ZIP.

**Can I trim many files at once?**

Yes. Drop as many as you like; they are trimmed in background workers with the same settings and can be downloaded together as a ZIP.

**Are my images uploaded?**

No. Everything happens in this browser tab and your files stay on your device.

## More PNG *tools*

- [PNG Compressor](https://pngmender.me/): Shrink PNGs with a smart palette of up to 256 colours (transparency kept) and a lossless oxipng pass. Batch, compare, ZIP.
- [PNG Chunk Inspector](https://pngmender.me/png-chunk-inspector/): Every chunk with offset, length and CRC check: decoded text, palettes, DPI, colour profiles, APNG frames and a hex view.
- [PNG Metadata Remover](https://pngmender.me/png-metadata-remover/): Strip text, timestamps, EXIF and private chunks without re-encoding a single pixel.
- [Repair PNG](https://pngmender.me/repair-png/): Fix bad CRCs, damaged signatures, a missing IEND and cut-off downloads, and unmask JPEGs posing as PNGs.
- [Make PNG Transparent](https://pngmender.me/make-png-transparent/): Pick a background colour with the eyedropper and remove it, with tolerance, edge flood fill and soft edges.
- [Trim Transparent PNG](https://pngmender.me/trim-transparent-png/): Auto-crop empty transparent or solid borders, then add padding, square the canvas and centre. Batch.
- [APNG Maker](https://pngmender.me/apng-maker/): Turn PNG or JPG frames into an animated PNG with per-frame timing, or split an APNG back into frames.
