Image Compressor
← Back to Blog

Compress Transparent PNG Losslessly Without Grey Edges: A Full Workflow

2026-10-27

A transparent png compress job fails in a particular way: the file gets smaller, the transparency is still there, and the logo still looks broken because the edges picked up a grey fringe. Transparency adds an alpha channel next to RGB, and the tricks that save the most bytes tend to act right on those edge pixels. Here is how to choose between PNG-8 and PNG-32, which chunks are safe to strip, and how to keep the edges clean.

What the alpha channel actually costs

A PNG without transparency stores three values per pixel; add transparency and a fourth joins them, which raises the ceiling on file size. That is why the same logo often grows after you cut the background out.

What lossless means here

PNG already uses deflate, which is a lossless algorithm. So lossless compression means changing no pixel value at all, only finding a cheaper way to store the same ones. Reducing the palette or the color count is lossy, because the pixels really do change.

Chunks you can strip safely

A PNG is a set of chunks, and some of them have nothing to do with drawing the image.

On the command line: pngcrush -rem alla -reduce in.png out.png, or oxipng -o 4 --strip safe in.png. The strip metadata option in an online tool does the same thing.

Where the grey fringe comes from

Anti-aliasing leaves the edge pixels partly transparent, and their color was blended against whatever background the designer had. When a quantizer treats those pixels as solid, the result grows a pale outline the moment it sits on a dark surface.

A workflow worth reusing

The format trade offs sit in /blog/png-vs-jpg-differences, and the full PNG walkthrough is in /blog/compress-png-without-losing-quality. Ad slots with a hard KB cap are covered in /blog/compress-images-facebook-ads-2026, and vector icons work completely differently, which /blog/compress-svg-without-breaking explains.

FAQ

Will compressing a transparent PNG lose the transparency?

Not through a lossless pass. Transparency disappears when you convert to JPG or export without the alpha channel ticked. PNG to PNG never changes format.

PNG-8 or PNG-32?

It depends on the artwork. Flat logos, icons and single color illustrations do well as PNG-8 and often come in at a quarter of the size. Anything with a shadow, a gradient or layered translucency belongs in PNG-32, because quantizing bands it.

Why is there a white outline on my dark background?

The semi-transparent edge pixels were quantized as if they were solid. Re-run the compression with premultiplied alpha, or fall back to PNG-32 and stay lossless.

How much does lossless compression usually save?

Stripping chunks and repacking deflate typically gives 10 to 30 percent. Files from a design tool carry more metadata and land near 30; already optimized files give around 5. Bigger savings than that mean changing the color count, which is a different trade.

Compress a transparent PNG losslessly in your browser, no upload

More reads: How to Compress JPG to Under 100KB Online (Free, No Sign-Up)How to Compress PNG Without Losing Quality (Free, Online)The Complete Guide to Compressing WebP Images

Free guide: compress images to an exact size (200KB / 100KB / 50KB) →