Run pngquant on Mac (the easy way)
pngquant is the tool every PNG optimiser uses under the hood. Here's how to use it on macOS — or skip the Terminal entirely.
You read somewhere that pngquant is what real PNG optimisers run, and you’d like to try it. Good news: it’s free, it’s open source, and it installs in about thirty seconds on a Mac. Slight catch: it’s a command-line tool. Here’s how to use it both ways.
Why pngquant
pngquant does palette quantization — it picks the best 256 (or fewer) colours to represent your image, then writes a PNG with an indexed colour table. This is where the real PNG size savings come from. macOS’s built-in sips doesn’t do this. Preview doesn’t either. Almost every PNG optimiser you can name — ImageOptim, TinyPNG, Squoosh, OptiPNG (combined with it) — has pngquant somewhere in its pipeline.
The Terminal way
Install with Homebrew:
brew install pngquant
Basic use:
pngquant —quality=65-80 input.png
This writes input-fs8.png next to the original. Flags worth knowing:
--quality=MIN-MAX— the quality range. 65-80 is the standard sweet spot. If pngquant can’t hit at leastMIN, it skips the file.--strip— removes metadata (EXIF, colour profile chunks).--ext .png --force— overwrite the original with a.pngextension instead of the-fs8.pngsuffix.--speed 1— best quality (slowest). Default is 3. Use--speed 11for fast batch jobs.
A typical “make this small but invisible” command:
pngquant —quality=70-90 —strip —ext .png —force input.png
For a folder:
for f in *.png; do pngquant —quality=70-90 —strip —ext .png —force “$f”; done
The faster way (no Terminal)
If you’d rather not memorise flags or live in Homebrew updates, Download Melt. It wraps the same pngquant-grade quantization (plus zlib re-compression) in a drag-and-drop app.
- Download Melt and open it.
- Drag the PNG (or a folder) in.
- Pick quality — 80 is the default and matches pngquant's `--quality=65-80` range.
- Click Compress.
The results are functionally equivalent because the algorithm under the hood is the same. The difference is the friction: drag versus Terminal.
How much smaller will it really get?
A typical UI screenshot or design export: 70-85% smaller. A photographic PNG (which shouldn’t really be PNG): 30-50% smaller. A PNG with very few colours already: maybe 10-20%. pngquant’s “never makes it worse” check means files that wouldn’t benefit get skipped.
Honestly — if you only need it occasionally, the Terminal command is fine. If it’s a regular part of your workflow, the GUI shaves real time.
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.