← Blog

How to Reduce PNG File Size Without Losing Transparency

By Gaurav Bhowmick·5 min

PNG files are the default choice for screenshots, logos, UI elements, and any image that needs transparency. But they are also notoriously large — a single screenshot can be 2-5 MB, and a detailed illustration with transparency easily hits 10 MB+. Here is how to reduce PNG file sizes significantly without destroying what makes PNG useful: lossless quality and alpha transparency.

Why PNG files are larger than JPEG

PNG uses lossless compression — every pixel is preserved exactly. JPEG uses lossy compression — it discards visual data to achieve smaller files. For photos, this trade-off makes JPEG far more efficient. But for images with text, sharp edges, flat colours, or transparency, PNG is necessary because JPEG compression creates visible artefacts around hard edges and does not support transparency at all.

The core tension: you need PNG for quality or transparency, but the file size is unacceptable for web performance. The solution depends on whether your PNG actually needs all 16.7 million colours (PNG-24) or can work with a reduced palette (PNG-8).

PNG-8 vs PNG-24: the biggest win

Most PNG compression comes from converting PNG-24 (16.7 million colours, full alpha) to PNG-8 (256 colours, binary or partial alpha). For screenshots, UI mockups, icons, and illustrations with flat colours, PNG-8 often looks identical to PNG-24 at 60-80% smaller file size. The limited palette is invisible because these images rarely use more than 100 distinct colours anyway.

Where PNG-8 fails: photographic content, complex gradients, and images with subtle semi-transparent shadows. If your PNG has smooth colour transitions or many semi-transparent pixels, PNG-8 will show visible banding. In these cases, keep PNG-24 and use other techniques below.

Techniques that work

Colour quantisation (lossy PNG compression)

Tools like pngquant reduce the colour palette intelligently — keeping visually important colours while merging similar shades. A 24-bit PNG screenshot can drop from 3 MB to 800 KB with no visible difference. This is technically lossy (data is removed) but the visual result is lossless to the human eye for most content types.

Lossless re-encoding (zero quality loss)

PNG files from different sources (Photoshop, Figma, screenshots) use different internal encoding strategies. Tools like OptiPNG and Zopfli re-encode the same pixels using more efficient compression parameters — reducing file size by 5-25% with zero quality loss. The pixels are bit-for-bit identical; only the encoding is more efficient.

Convert to WebP with transparency

WebP supports lossless compression with alpha transparency — the same features as PNG but with 25-35% smaller files. If your target audience uses modern browsers (Chrome, Firefox, Safari 14+, Edge), converting PNG to WebP is the single most effective size reduction. MiniPx can convert PNG to WebP in one click while preserving transparency.

When to keep PNG vs convert

Keep PNG when you need: universal compatibility (email clients, legacy systems, print workflows), bit-perfect quality for archival, or when the file will be edited further. Convert to WebP when the image is destined for web display and you control the hosting. Convert to JPEG (dropping transparency) when the image is a photo that does not actually need a transparent background.

Practical file size targets

For web: aim for under 200 KB per PNG. If a PNG exceeds 500 KB, strongly consider whether WebP or even JPEG (with a solid background) would work instead. For icons and small UI elements: under 20 KB. For hero images that must stay PNG: under 500 KB, with lazy loading below the fold. MiniPx shows the exact savings for each approach — try compressing as PNG first, then compare with WebP output to see which gives better results for your specific image.

Related tools

Compress PNGConvert PNG to JPGConvert PNG to WebP

More from the blog

JPEG vs PNG vs WebP — Best Format for WebsitesJPEG vs PNG: When to Use Each FormatLossy vs Lossless Compression: When to Use Each
🔧
Try MiniPx — free, no signup

Compress, convert, and resize images in your browser. Nothing gets uploaded.

Open MiniPx →