Why did compressing my PNG remove the transparency?

Updated

Why did compressing my PNG remove the transparency?

PNG compression does not remove transparency. If the see-through areas turned a solid colour, the file was saved as JPG — JPEG has no alpha channel, so transparent pixels are flattened onto a background (white by default). Stay on PNG, or use WebP if you need a smaller file that still supports transparency. EditItAll runs in your browser; nothing is uploaded.

Do it now — free, in your browser

Open the PNG compressor

PNG compression does not delete transparency

PNG was designed to keep an alpha channel — the per-pixel opacity that makes logos, stickers and cut-out product shots sit on any background. Default PNG recompress is lossless: it re-packs the same pixels, including that alpha. The picture should look identical, holes and all, just in a tighter file.

If the holes filled in, you did not “compress the PNG badly”. You left PNG. The usual exit is JPEG, which cannot store transparency at all. That is a format change, not a PNG setting. The PNG format guide is the right mental model: lossless, with transparency; photographs stay large.

What actually flattened the image

Check the downloaded filename and type:

  • The file is now a JPG. Transparent pixels were composited onto a solid background (white is the default) and the alpha was discarded. A PNG to JPG conversion always does this — JPG has nowhere to put see-through pixels.
  • It is still a PNG, but the checkerboard is gone. The graphic may have been flattened before you compressed it, or the quality slider was dropped far enough to reduce the colour palette. Default PNG compress does not flatten.
  • You needed a smaller file and picked JPG for that reason. Size and transparency are different jobs. JPG wins size on photos and loses alpha. PNG keeps alpha and stays larger.

You cannot paint the original transparency back from a flattened JPG. The discarded alpha is gone, the same way lossy detail is gone. Keep a master PNG.

Keep the holes: stay on PNG, or use WebP

Open the PNG compressor and drop in the original transparent file — not the flattened copy.

  • Leave the output on PNG. Default recompress is lossless, so transparency survives. Read the in → out size. Photographs barely shrink; logos, icons and screenshots often do.
  • If the PNG is still too large and you must keep transparency, compress as WebP instead. WebP can store alpha. JPG cannot.
  • If you truly want a JPG (a photo with a solid background), flatten on purpose and pick the background colour, knowing the holes will not come back.

Everything runs on your device. Files are never uploaded, EXIF is stripped on export, and you can go offline after the page loads. Lossless PNG habits are in compressing PNG without losing quality; why photo PNGs stay huge is in why PNG files are so large.

Ready to try it?

Free, no sign-up, and nothing you open ever leaves your device.

Frequently asked questions

Does compressing a PNG remove transparency?+

Not at the default setting. PNG recompress is lossless, so the alpha channel stays. If transparency vanished, the file was almost certainly saved as JPG or flattened onto a background.

Why did my transparent PNG turn white?+

JPEG has no transparency. Converting PNG to JPG composites see-through pixels onto a background — white by default — and drops the alpha. The white is that background, not a corrupt PNG.

Can I get the transparency back after saving as JPG?+

No. The alpha channel is gone. If you still have the original PNG, compress that instead. A flattened JPG cannot reconstruct the holes.

What format keeps transparency and stays small?+

PNG keeps transparency losslessly. WebP can keep transparency at a smaller size, with a quality trade if you use a lossy setting. JPG cannot keep transparency at any quality.

Are my PNG files uploaded to compress them?+

No. The PNG compressor runs entirely in your browser. Files never leave your device, and the page still works offline after it loads.

Related guides

More guides on compressing images →