Image Compression

Back to Blog

How to Reduce PNG File Size: 7 Proven Methods

Updated: March 2026

PNG files are beloved for their lossless quality and transparency support, but they come with a significant downside: large file sizes. A single PNG screenshot can easily weigh in at 2-5 MB, and high-resolution PNG photographs can exceed 20 MB. For websites, email attachments, and storage, these bloated files create real problems. Page load times suffer, bandwidth costs increase, and users abandon slow-loading pages at alarming rates. The good news is that PNG files often contain far more data than necessary, and with the right techniques you can reduce their size by 50-80% while keeping them visually identical or nearly so. This guide walks you through seven practical methods to shrink your PNG files, from quick wins to advanced optimization strategies.

Why Are PNG Files So Large?

PNG uses lossless compression, which means every single pixel is preserved exactly as it was. Unlike JPEG, which discards visual information the human eye is unlikely to notice, PNG keeps everything. This is excellent for quality but terrible for file size. A typical PNG stores 32 bits per pixel (8 bits each for red, green, blue, and alpha transparency), so a 1920x1080 image contains over 8 million pixels and roughly 33 MB of raw data before compression. PNG's built-in DEFLATE compression brings that down significantly, but the result is still much larger than a lossy JPEG of the same image. Additionally, many PNG files contain unnecessary metadata, use a higher bit depth than needed, or include a full alpha channel even when no transparency is present. Each of these factors contributes to an unnecessarily large file.

Method 1: Reduce Color Depth (32-bit to 8-bit)

This is often the single most effective way to reduce PNG file size. A standard PNG-24 or PNG-32 image stores millions of possible colors per pixel. But many images, especially graphics, icons, logos, charts, and screenshots, use only a few hundred distinct colors. By converting to PNG-8 (indexed color mode), you limit the palette to 256 colors or fewer. The result? File sizes can drop by 60-80% with minimal or no visible difference for suitable images. Tools like pngquant perform this conversion intelligently, using advanced dithering algorithms to simulate smooth gradients even with a reduced palette. For simple graphics with flat colors, the output is visually identical to the original. For photographs, PNG-8 is generally not ideal because the limited palette cannot accurately represent the subtle tonal variations, but for most web graphics, UI elements, and illustrations, this method is a game-changer.

Tip: pngquant lets you set a quality range (e.g., --quality=65-80) so it only converts if the result meets your quality threshold. If the image can't be reduced without visible degradation, it skips the file.

Method 2: Remove Transparency If Not Needed

PNG-32 images include a full alpha transparency channel, which adds 8 bits of data per pixel. If your image doesn't actually use transparency, such as a photo or a screenshot with a solid background, that alpha channel is pure waste. Removing it converts the image from 32-bit to 24-bit, immediately saving approximately 25% of the raw pixel data. Even better, if you can convert to PNG-8, you save even more. To check whether your PNG uses transparency, open it in any image editor and look for a checkerboard pattern behind the content. If the background is solid throughout, you can safely flatten the image. Many PNG optimization tools will strip unused alpha channels automatically, but it's worth verifying since some export workflows add an alpha channel by default even when it isn't needed.

Method 3: Use PNG Optimization Tools

Dedicated PNG optimization tools can squeeze significant savings out of your files using different strategies. Some work losslessly, rearranging how data is stored without changing a single pixel. Others use lossy techniques like color palette reduction to achieve even greater savings. Here are the most popular tools and what they do:

  • pngquant: Lossy compression. Converts to PNG-8 with intelligent dithering. Saves 40-80%. Best overall tool for maximum reduction.
  • OptiPNG: Lossless optimization. Tries multiple compression strategies and keeps the smallest result. Saves 5-30%.
  • Zopfli/ZopfliPNG: Lossless. Uses a much slower but more efficient DEFLATE compressor. Saves 3-8% beyond OptiPNG.
  • TinyPNG: Web-based. Uses lossy smart palette reduction (similar to pngquant). Free for up to 500 images/month.
  • pngcrush: Lossless. Tries hundreds of filter/compression combinations. Similar results to OptiPNG.

For the best results, combine a lossy tool like pngquant with a lossless optimizer like OptiPNG. First reduce the color palette with pngquant, then run OptiPNG on the result to squeeze out the last few percentage points. This two-step approach consistently delivers the smallest files.

Method 4: Resize Image Dimensions

One of the most overlooked ways to reduce PNG file size is simply making the image smaller in pixel dimensions. A 3000x2000 pixel screenshot is massively oversized for web use where it will display at 800px wide. Since file size scales roughly with the total number of pixels, cutting dimensions in half reduces file size by approximately 75%. Before optimizing compression, ask yourself: what is the largest size this image will ever be displayed at? For website images, 1200-1920 pixels wide is usually the maximum needed. Blog thumbnails rarely need more than 600-800 pixels. Social media platforms have their own recommended dimensions, typically well under 2000 pixels. Resize first, then apply other optimization techniques for the greatest cumulative savings.

Method 5: Convert to WebP or JPG When Appropriate

Sometimes the best way to reduce PNG file size is to stop using PNG altogether. If your image is a photograph with no transparency, converting to JPEG will typically reduce the file size by 80-90%. A 5 MB PNG photograph becomes a 300-500 KB JPG at quality 85 with virtually no perceptible loss. For images that need both small file size and transparency, WebP is an excellent alternative. WebP lossless is typically 26% smaller than PNG, and WebP lossy with an alpha channel can be dramatically smaller. With browser support now exceeding 97%, WebP is a practical choice for nearly all web applications. The key question is whether you truly need lossless quality. For web display where images are viewed on screen, lossy compression at high quality settings is indistinguishable from lossless for most viewers.

PNG to JPGPNG to WebP

Method 6: Strip Metadata

PNG files can contain a surprising amount of hidden metadata: color profiles (ICC), text annotations, creation timestamps, software information, and various ancillary chunks. While individually small, these chunks can add up to tens of kilobytes. For screenshots taken on macOS, the embedded color profile alone can be 3-5 KB. Stripping all non-essential metadata is a quick win that produces savings of 2-20% depending on the file. Most PNG optimization tools strip metadata by default, but you can also use dedicated tools like ExifTool or the command-line utility pngstrip. This is a completely lossless operation since it removes data that has zero effect on how the image looks. As a bonus, stripping metadata also removes any personally identifiable information that may be embedded in the file, improving privacy when sharing images online.

Method 7: Use Indexed Color (Palette-Based PNG)

Indexed color is the technical name for what PNG-8 does: instead of storing full RGB values for every pixel, the image stores a palette of up to 256 colors, and each pixel is represented by an index into that palette. This means each pixel needs only 8 bits instead of 24 or 32, a savings of 67-75% at the raw data level. Indexed PNGs are ideal for graphics with limited color ranges: logos, icons, diagrams, UI elements, pixel art, and simple illustrations. Modern tools can create indexed PNGs with semi-transparency by assigning different alpha values to palette entries, something older tools couldn't do. If your graphic uses fewer than 256 colors, an indexed PNG is the optimal choice because it is both perfectly lossless and dramatically smaller than a truecolor PNG.

Understanding PNG Compression Levels (0-9)

PNG has a built-in compression level setting from 0 (no compression) to 9 (maximum compression). A common misconception is that higher compression means lower quality. This is wrong. PNG compression is always lossless regardless of the level. The only difference is how hard the compressor works to find patterns in the data. Level 0 stores data with no compression, resulting in the largest file but the fastest save time. Level 9 applies maximum compression effort, resulting in the smallest file but the slowest save time. Levels 1-8 represent intermediate trade-offs between speed and size. For most purposes, the default level of 6 offers a good balance. The difference between level 6 and level 9 is typically only 1-3% in file size but can be several times slower. If you're processing thousands of images in a batch pipeline, level 6 or even level 4 may be more practical than level 9.

PNG Optimization Methods Compared

MethodTypeExpected SavingsQuality Impact
Color depth reduction (PNG-8)Lossy60-80%Minimal for graphics
Remove alpha channelLossless*~25%None
pngquant (lossy)Lossy40-80%Very low
OptiPNG (lossless)Lossless5-30%None
Resize dimensions (50%)Lossy~75%Reduces detail
Convert to JPGLossy80-90%Slight (no transparency)
Convert to WebP losslessLossless20-30%None
Strip metadataLossless2-20%None

*Removing unused alpha channel doesn't change visible appearance

Frequently Asked Questions

Q: Can I reduce PNG file size without losing quality?

A: Yes. Lossless methods like OptiPNG, Zopfli, stripping metadata, and removing unused alpha channels all reduce file size without changing a single pixel. You can typically save 10-30% this way. For larger savings (50%+), lossy techniques like palette reduction are needed but produce negligible visual differences for most web graphics.

Q: What is the difference between pngquant and OptiPNG?

A: pngquant is a lossy optimizer that reduces the number of colors in the image (typically to 256 or fewer) for dramatic file size reduction of 40-80%. OptiPNG is a lossless optimizer that tries different compression strategies without changing any pixel data, typically saving 5-30%. For maximum results, run pngquant first, then OptiPNG on the output.

Q: Does PNG compression level affect image quality?

A: No. PNG compression levels (0-9) only affect how much time the encoder spends looking for patterns in the data. All levels produce pixel-identical output. Level 9 creates a slightly smaller file than level 1, but both look exactly the same. The only trade-off is encoding speed.

Q: When should I give up on PNG and switch formats?

A: If your image is a photograph with no transparency, JPG will almost always be 5-10x smaller than PNG at acceptable quality. If you need transparency but smaller files, consider WebP which supports both transparency and lossy compression. Stick with PNG when you need guaranteed lossless quality for graphics, screenshots with text, or images that will be edited further.

Need to convert your PNGs to a smaller format?

Convert PNG to JPG Free

Related Articles