A great many tools offer to "compress your PNG". Some of them do something useful. Others move the file through an encoder that cannot make it smaller and hand it back, unchanged, while claiming a saving. Knowing which situation you are in takes about a minute of understanding.
What lossless actually means
PNG stores the image exactly. When it is decoded, every pixel has the same value it had before encoding. The format saves space not by discarding detail, but by describing the same detail more compactly: it finds repetition across a row, or across rows, and encodes a shorter description of it.
That has a direct consequence for compression. There is no «detail» to trade away, so there is no quality setting. Any tool that offers a quality slider for PNG output is either ignoring the slider or quietly converting the image to a lossy format.
So why does re-encoding rarely help?
Because the PNG you already have was almost certainly produced by an encoder that did the same work. Running it through another one finds nothing new to exploit. Sometimes it finds a little less, because the browser's encoder is built for speed and generality while the one that made your file may have been optimised for that particular image. A small increase in size is a normal, honest outcome, not a failure.
There are specialised PNG optimisers that try many filter and deflate combinations and pick the smallest result. They can save a few per cent on some files. They are slow, and a few per cent is usually not what someone asking to "compress a PNG" actually needs.
What does work
Three things, in order of how much they usually save:
- Reduce the dimensions. This is the reliable lever. A screenshot at 2560 pixels wide, displayed at 1280, is carrying four times the pixels it needs. Halving both sides quarters the file.
- Convert to WebP. WebP supports transparency like PNG and compresses far better. For most PNGs destined for a web page this is the single largest saving available, and it is a conversion rather than a compression — which is why it works.
- Convert to JPEG, if the image is a photograph and does not need transparency. A photograph saved as PNG is often several times larger than the same photograph saved as JPEG, for no visible benefit.
When PNG is the right answer anyway
Screenshots, diagrams, logos, charts and anything with sharp text or flat colour. JPEG handles those badly: it produces visible fringing around letters and mush in flat areas, and for that kind of image PNG is frequently the smaller file as well as the correct one.
So the honest summary is: if the image is a screenshot and it is already a reasonable size, leaving it as PNG may be the best decision available. Keeping a file that is already close to optimal is a legitimate outcome, and a tool that says so is more useful than one that invents a saving.