Trim Transparent Pixels
Upload a PNG or WebP image to automatically crop transparent borders with adjustable threshold and padding
Drop a PNG or WebP with bloated transparent borders and get back a tight crop in one click. The tool scans every pixel's alpha channel, finds the exact bounding box of your visible content, and cuts away the empty space — with optional threshold and padding controls for fine-tuning. And everything runs in your browser. Nothing gets uploaded.
How It Works
The tool draws your image onto an invisible canvas, then reads every pixel's alpha value. It walks inward from each edge — top, bottom, left, right — to find the first row or column containing a non-transparent pixel (based on your threshold setting). That gives the tightest possible rectangle. A new canvas gets created at that exact size, your image is drawn onto it with optional padding, and you download the result.
Examples
Logo exported from Figma with extra canvas
Your designer handed you a 1024×1024 PNG, but the logo itself is only about 340×120 pixels in the center.
logo.png — 1024×1024
Visible area: ~340×120
Transparent border: ~340px each side
logo-trimmed.png — 340×120
File size: ~85% smaller
No wasted pixels
Game sprite with antialiased glow
A character sprite has a soft glow effect that fades to nearly-transparent at the edges. Default threshold (0) leaves a faint halo.
sprite.png — 512×512
Glow fades to alpha 3-5 at edges
Threshold set to 10
sprite-trimmed.png — 388×410
Faint glow edges removed
Clean bounding box
Batch of icons that need consistent sizing
You have 20 app icons all exported at 256×256, but each icon's actual content sits differently inside the canvas. Trimming first, then re-adding 8px padding, gives uniform tight crops with equal spacing.
icon-settings.png — 256×256
Actual content: 180×190
Padding slider: 8px
icon-settings-trimmed.png — 196×206
Content fills frame evenly
8px breathing room on all sides
Who Uses This
Clean up icon and logo exports before handing assets to developers.
Trim PNGs so CSS spacing isn't thrown off by invisible padding baked into the file.
Crop sprite sheets and individual frames to reduce texture atlas waste.
Trim product images on transparent backgrounds so they line up in grid listings.
Common Mistakes
JPEGs don't have an alpha channel — every pixel is fully opaque. The tool won't find anything to trim. Convert to PNG first if you need transparent edges removed.
A threshold of 40+ will treat semi-transparent drop shadows and soft edges as empty space. Start at 0 and nudge up slowly. If your shadow disappears, you've gone too far.
A white background (RGB 255,255,255 with alpha 255) is fully opaque. This tool trims transparency, not color. If you need to remove a white background, use a background remover tool first, then trim.
Technical Details
- Processing: 100% client-side — images never leave your browser
- Supported Formats: PNG, WebP (any image with alpha channel)
- Alpha Threshold: 0–50 (0 = only fully transparent, 50 = aggressively trim near-transparent)
- Padding: 0–50px added uniformly after trim
- Browser Support: Chrome, Firefox, Safari, Edge
Frequently Asked Questions
How do I remove transparent space around a PNG?
Drop your PNG into this tool and click Trim. It reads the alpha channel of every pixel, finds the smallest rectangle that contains all visible content, and crops to that. The whole thing takes about a second for most images.
Does trimming transparent pixels reduce file size?
Usually, yes — sometimes dramatically. A 1024×1024 image where the content only occupies 300×200 pixels is storing a lot of empty data. After trimming, the PNG compresses much smaller because the canvas itself shrinks. Exact savings depend on how much transparent area existed.
What's the difference between alpha threshold 0 and higher values?
At 0, only pixels with zero opacity get trimmed. Bump it higher and the tool also cuts pixels that are almost invisible — like those faint antialiased edges from Photoshop. A value of 5–10 cleans up most halos without touching anything you'd actually notice.
Can I trim transparent pixels without Photoshop?
That's exactly what this is for. No software install, no subscription. Upload, trim, download. Works on any device with a modern browser — phone included.
Is it safe to trim images with sensitive content?
Yes. Your image stays in your browser the entire time — it is never sent to a server. All the pixel scanning and cropping happens through the HTML Canvas API on your own machine. Nobody else sees your file.