Edit / PixelDesk

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.

Processed on your device
THE PLAYGROUND

Trim empty edges

01 / ORIGINAL IMAGENo image yet

Drop your image here.

Choose an image, or drop it here.

JPEG, PNG, WebP, AVIF or HEIC · up to 20 MiB each

    Use Undo settings to revisit an adjustment. Your source image stays untouched.

    02 / Make it yours

    Adjust your settings, then create a new copy.

    Margin detection
    12
    0

    0 keeps every partially visible pixel. Raising this can discard faint shadows.

    Export
    90

    PNG is lossless; its quality slider is disabled.

    Output format & background

    Fills transparent areas for JPEG and when transparency is off.

    Choose an image or try the sample to get started.

    TESTED IN THE BROWSER

    Trim a padded transparent product image

    The same original bottle illustration used in the color-removal guide now has its empty outer canvas removed.

    Small bottle centered on a large transparent canvas
    Before1,200 × 800 px · PNG · 352.1 KiB (360,509 bytes)Open full-size before image ↗
    The same bottle with its transparent outer margins cropped away
    After256 × 733 px · PNG · 317.9 KiB (325,486 bytes)Open full-size after image ↗

    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

    1. Open a PNG or WebP with transparent margins, or choose solid-color detection for a uniform background.
    2. Start with alpha cutoff 0. Adjust tolerance only for a solid background, then choose how much existing margin to keep.
    3. Process to detect exact full-size bounds. Check the dimensions and edges, then download a new copy.
    Read the guide: Fit vs crop: resize without distortion

    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 tools
    PRACTICAL WORKFLOW

    A 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.