🔒 100% private — runs in your browser, nothing is uploaded

Trim Transparent Pixels

Crop the empty transparent border off a PNG — find the bounding box of the real content and download the tight image.

Exported artwork, logos and cutouts usually sit in a canvas much larger than the artwork itself, and that empty transparent margin breaks layouts, thumbnails and print sizing downstream. Trimming is a bounding-box problem: scan every pixel’s alpha value, remember the smallest and largest x and y that hold a real pixel, and crop to that rectangle. Worked example: an 800 × 600 export whose artwork actually occupies x from 100 to 699 and y from 50 to 549 trims to exactly 600 × 500 px starting at (100, 50) — a third of the canvas area was empty border. The scan here is literal and complete, all four edges from the real pixel data, not an estimate from a downscaled preview, so a single stray opaque pixel in a corner genuinely counts as content.

Only the empty transparent border is removed — the pixels that remain are copied exactly, with no re-scaling and no colour change, and the transparency inside the kept area is preserved. Your image is never uploaded, stored or put into a link: it is read locally on your device, cropped in this browser, and the file is created only when you click Download.

Quick answers

How do I crop the transparent border off a PNG?

Load the PNG and the tool scans every pixel’s alpha, finds the bounding box of the content, and crops to it: an 800 × 600 export with content from (100, 50) to (699, 549) becomes a 600 × 500 PNG starting at (100, 50).

The kept pixels are copied exactly, with their transparency preserved, entirely in your browser — the image is never uploaded.

What does the alpha threshold do?

It sets how opaque a pixel must be to count as content. At 0, any pixel with alpha above 0 counts; raise it to ignore faint glow, shadows or haze at the edges and get a tighter crop.

If everything sits at or below the threshold, the tool reports a fully transparent image rather than returning an empty file.

How to use

  1. Choose a PNG with transparency — it is read locally on your device, never uploaded.
  2. Leave the alpha threshold at 0 to keep every pixel that is not fully transparent, or raise it to ignore faint semi-transparent haze, glow or stray specks when finding the edges.
  3. Read the before and after sizes: the tool reports the original dimensions, the cropped dimensions, and where the content starts (its x, y offset).
  4. Download the cropped PNG. The kept pixels are copied exactly — no scaling, no colour change, and transparency inside the kept area is preserved.

About this tool

The threshold is your control over what “real” means. At the default of 0, any pixel with alpha above zero — even 1 out of 255, effectively invisible — extends the box, which is the safe setting for production assets. Raise it when exports carry a soft glow, a drop shadow or compression haze you consider border: at a threshold of 32, for instance, pixels at a quarter transparency or less are treated as empty, and the crop tightens to the solid artwork. If every pixel falls at or below the threshold, the tool reports a fully transparent image instead of inventing a crop. One warning that follows from the same honesty: a single stray opaque speck — a leftover eraser dot far from the artwork — will hold the box open, and the reported offset tells you exactly where to look for it. Your image is never uploaded; the scan and the crop happen in this browser.

Frequently asked questions

What counts as a transparent pixel?

A pixel whose alpha value is at or below the threshold. At the default threshold of 0, only fully transparent pixels (alpha 0) are empty and anything with even slight opacity counts as content. Raising the threshold treats faint pixels as empty too.

Does trimming change the pixels that remain?

No. The kept rectangle is copied pixel for pixel from the original — same colours, same alpha values, no scaling and no re-compression artefacts beyond the PNG encoding itself. Only the canvas size and the content’s offset change.

Why did almost nothing get trimmed?

Usually one of two reasons: a stray nearly invisible pixel near an edge is holding the bounding box open (raise the threshold a little and watch the reported offset move), or the image genuinely has content near all four edges. The before/after line shows the exact box so you can tell which.

What if my image has no transparency at all?

Then every pixel is content, the bounding box is the whole image, and the tool reports the same size before and after — a correct no-op. The tool is meant for PNGs with transparent margins; a fully opaque photo has nothing to trim.

📦 Embed this tool on your site

<iframe src="https://verystep.com/embed/trim-transparent-pixels/" title="Trim Transparent Pixels" width="100%" height="520" loading="lazy" style="border:0"></iframe>

Free to use. The embed shows a small "Powered by Verystep" link.

First time embedding? Read the step-by-step guide →

More free tools