Trim transparent or solid image margins
Detect the smallest rectangle containing your artwork, remove matching outer margins and optionally keep a little spacing. Preview locally before exporting.

Trim empty edges
03 / Your result is ready.
Export createdTrim a padded transparent product image
The same original bottle illustration used in the color-removal guide now has its empty outer canvas removed.


Reproduce the settings
- Empty margin type
- Transparent pixels
- Alpha cutoff
- 0
- Keep margin
- 0 px
- Export / transparency
- PNG / on
What changed
The 1,200 × 800 canvas becomes 256 × 733. The detected rectangle starts at left 478, top 34. Pixels inside that rectangle are retained, including the white handle opening.
What to inspect
Compare the complete bottle, the shadow and the handle at full size. A larger alpha cutoff can exclude faint edge pixels; leave it at zero when those pixels matter.
Follow the complete workflow ↗Tested 20 October 2026 in a Chromium browser. Sizes come from the saved exports. Previews are scaled; open the original files above for a full-size comparison. Other browser encoders can produce different results.
How to trim transparent or solid image margins
- Open a PNG or WebP with transparent margins, or choose solid-color detection for a uniform background.
- Start with alpha cutoff 0. Adjust tolerance only for a solid background, then choose how much existing margin to keep.
- Process to detect exact full-size bounds. Check the dimensions and edges, then download a new copy.
Know before you export
Only outer rows and columns are cropped. Matching pixels inside the retained rectangle are not erased. Color similarity can classify pale foreground details as background, and an alpha cutoff above zero can discard soft shadows. A completely empty image keeps its original dimensions. Kept margins cannot extend beyond the original canvas.
Supported files
Still JPEG, PNG, WebP and AVIF up to 20 MiB and 64 megapixels, plus HEIC where your browser can open it (Safari on Mac, iPhone and iPad). Photos above 24 megapixels are edited at 24 megapixels, and color effects run at up to 12 megapixels. Multi-image tools allow 12 files and 60 MiB of combined input. GIF, SVG, animated images and RAW formats are not supported.
Quick ways in
Drop an image anywhere on this page or paste one from your clipboard.
Keyboard shortcuts
- Ctrl/⌘ O Choose an image
- Ctrl/⌘ Enter Process
- Ctrl/⌘ S Download the result
- Ctrl/⌘ Z Undo settings · add Shift to redo
- Esc Cancel processing
Your files stay local
Selected image bytes are processed in browser memory. No account, upload endpoint or remote processing service is used.
Keep creating.
Explore all 39 toolsA practical Trim empty edges workflow.
Remove surplus transparent canvas from a logo before placing it in a layout.
Try this example
Open a padded transparent PNG, select Transparent pixels and leave alpha cutoff at 0. Process once with no kept margin, then compare a copy with 16 pixels of margin.
Check before downloading
Inspect all four edges and any faint shadows at full size. Only the outer rectangle changes; matching holes inside the artwork remain intact.
If the result is unexpected
If no edge is removed, the subject may touch every side or a faint stray pixel may extend the bounds. Increase alpha cutoff cautiously. For a white canvas, switch to solid-color detection rather than transparent pixels.
Trim empty edges is free to use in your browser. No account or image upload is required.
Trim empty edges: common questions
Does trimming erase white areas inside my artwork?
No. This crops only the outside rectangle. Matching colors within the retained rectangle remain unchanged. A high color tolerance can still cause pale outer details to be excluded from the detected bounds.
What happens when the image is completely transparent?
The original dimensions are retained, with an explanation in the result. PixelDesk does not create a zero-sized file. Keep alpha cutoff at zero to retain every partially visible edge pixel.





