Lossless PNG compression on Mac
There are two flavours of lossless for PNG. Here's what each one means on macOS and how to use them.
You want to shrink the PNG, but the asset is going into a design system or onto a print-ready spec, so “looks identical” isn’t good enough — you need every pixel preserved. The good news is that PNGs always have headroom for genuinely lossless compression. The honest news is that it’s much less than what a quantized PNG can do.
Why this happens
PNG already compresses using zlib (deflate), but most exporters use middling settings to save encoding time. Re-encoding with maximum effort, smarter filter selection, and tools like Zopfli or AdvPNG can squeeze out another 10-25% with zero pixel change.
That’s it. Genuinely lossless PNG compression typically gets you 10-25% reductions. If you’re seeing 80% savings, that’s quantization (technically lossy, even if invisible).
The native way
sips will re-encode at max compression:
sips -s format png —setProperty formatOptions 100 input.png —out output.png
Modest savings, but byte-perfect lossless. For more, install optipng:
brew install optipng && optipng -o7 input.png
-o7 is the highest optimisation level — slow on big files but tries every filter and stream combination. Then layer on zopflipng for one more pass:
brew install zopfli && zopflipng -m input.png output.png
-m runs more iterations. Add --iterations=50 for a heroic effort that can take minutes per file. This pipeline is what professional optimisation tools use under the hood.
The faster way (when you don’t need byte-perfect)
If “looks identical to my eyes” is enough, Download Melt and run pngquant-style quantization at quality 90. The output is visually indistinguishable but technically a different pixel set — and it’s 60-75% smaller, not 10-25%.
- Download Melt and open it.
- Drag the PNG in.
- Set quality to 90 for the highest visually-lossless tier, or leave it at 80 for the standard sweet spot.
- Click Compress.
How much smaller will it really get?
Genuinely lossless (optipng -o7 + zopflipng -m): 10-25% smaller. Visually lossless (Melt at 90): 60-75% smaller. Visually lossless (Melt at 80): 75-85% smaller.
Honestly — for most real-world use, visually lossless is what you want. Save genuine lossless for the cases where a downstream tool will re-process the file and you can’t afford colour-table snapshots. For anything destined for a screen, the difference is mathematical and invisible.
More Melt tips
-
Receive iPhone photos as JPG via AirDrop (not HEIC)
AirDropping photos from iPhone keeps landing them as HEIC files on your Mac. Here's how to get them as JPG instead.
-
AVIF on Mac — opening and converting AVIF images
AVIF is the next-gen image format that's even smaller than WebP. Here's how to open and convert AVIF files on macOS.
-
How to batch compress a folder of photos on Mac
Compressing 200 photos one at a time is its own form of suffering. Here's how to batch compress images on macOS.
-
What's the best image format for the web (and how to export it on Mac)?
JPEG, PNG, WebP, AVIF, SVG — they each have a job. Here's how to pick the right one for the web and export it from your Mac.