Guide

How to compress a PNG without losing quality

PNG gives you two genuinely different kinds of compression. Knowing which one you are using is the whole trick.

To make a PNG smaller without visible quality loss, use lossless compression. It optimises how the image is stored while keeping its appearance and dimensions.

Compress a PNG with Lossless mode

  1. Add one or more PNG files to the lossless PNG compressor.
  2. Leave Lossless selected and start compression.
  3. Check the file sizes and compare the result with the original before downloading.

What "compressing" a PNG can mean

There are two separate operations people call PNG compression:

  • Re-packing. The pixel data is decompressed and compressed again with a better strategy, then unnecessary metadata is dropped. Every pixel comes out identical. This is what a tool like optipng or oxipng does.
  • Colour reduction. The image is rebuilt on a palette of 12–256 colours. Every pixel is snapped to its nearest palette entry. This is lossy, and it is where the dramatic savings come from.

Both produce a valid PNG. Only the first one is safe to run on a file you might need to edit later.

Path one: lossless re-packing

Canvas exports and screenshots can benefit from re-packing if they were encoded for speed. The visible image and its dimensions stay the same. The savings depend on how the original file was encoded.

The catch is that it cannot beat a file that was already optimised. If someone has run your PNG through an optimiser before, the second pass usually saves nothing and occasionally adds a few bytes for different chunk ordering. A tool that reports "0% saved" is being honest, not broken.

Path two: colour reduction

Here the image is mapped onto a smaller palette. This can reduce the file size substantially. The visible changes depend on the image:

  • Logos, icons, flat UI: often under 64 colours already. The reduction is essentially free.
  • Screenshots with text: survives well at 128–256 colours, because text is mostly two or three colours plus antialiasing.
  • Photographs and gradients: this is where banding appears. Smooth skies become visible steps.

Without dithering, 256 colours on a gradient produces obvious bands. With Floyd–Steinberg dithering, the same palette reads as slight grain instead — far closer to the original at normal viewing size.

Smooth pale sky behind wheat stems in the original PNG Original PNG 1.97 MB
Grain and visible colour steps in the same sky after palette compression Palette at quality 50 526 KB
Both crops show the same area of a 1086 × 1448 image. In this test, Lossless mode preserved the pixels in the crop and reduced the full file to 1.87 MB. Palette mode reduced it by about 74% and changed the texture of the sky.

So which should you pick?

Your fileUseExpect
A logo or icon you will edit againLosslessAppearance and dimensions preserved
A screenshot for a blog postPalette with a high quality settingCheck small text and fine edges
A photograph saved as PNGPalette, or export as JPEG or WebPCheck for visible grain in gradients
Anything already optimisedLossless, and accept 0%Nothing — stop here

Three mistakes worth avoiding

  1. Compressing a palette PNG again. It has already lost its colours; a second pass only degrades it further.
  2. Judging at 100%. Palette artefacts live at the pixel level. Zoom in once, decide, then trust your normal viewing size.
  3. Choosing PNG for photographs. If the source is a photo, JPEG or WebP will beat any PNG palette at the same visual quality and a fraction of the effort.

The short version

If you need the pixels intact, use lossless and accept a modest saving. If you need the file small and the image is graphic rather than photographic, use a palette with dithering and check the result at 200% before shipping it.

Compress a PNG now