Skip to content

Transparency Tools

Trims transparent borders, flattens alpha onto a chosen colour, or extracts the alpha channel as a mask.

Four things people need from an alpha channel and one place to do them: trim the empty margin, composite onto a colour before the file becomes a JPEG, pull the channel out as a greyscale mask, or fade the whole thing. The result panel then tells you whether what you have will survive a 1-bit alpha format.

🔒 Runs entirely in your browseralphatransparentmask

Drop an image with transparency, or one with a uniform border

Trim, flatten, or pull the alpha channel out as a mask.

How to use it

  1. Pick the operation

    Trim, flatten, mask or fade. Each shows only its own controls, because they share nothing but the input.

  2. For a trim, set the tolerance

    A JPEG’s “white” is 251 in places, so a tolerance of zero finds no margin at all on a real photograph and the trim appears to do nothing.

  3. For a flatten, pick the colour deliberately

    Whatever the image will sit on. The composite happens in linear light, which is what stops a grey seam appearing along every soft edge.

  4. Read the three percentages

    Opaque, transparent and partial. The partial figure is the one that decides which formats you can use.

Common questions

What is a 1-bit alpha, and why does it matter?

A pixel is either fully visible or fully gone — GIF, and a palette PNG with a tRNS entry, work that way. If your image has partially transparent pixels, those formats turn every soft edge jagged, so keep 8-bit alpha: PNG-32 or WebP.

Why does flattening in linear light matter?

Compositing is a weighted average of two colours. sRGB code values are not proportional to light, so averaging them averages the wrong quantity — which shows up as a darker grey seam along every anti-aliased edge.

The mask came out inverted from what my other tool expects.

White-is-opaque is the compositing convention and the default here; several print workflows use the opposite. The polarity switch flips it.

Feed it from

Next

These accept what this tool produces, so the result can go straight in.