Melt guide

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.

4 min read

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:

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.

  1. Download Melt and open it.
  2. Drag the PNG (or a folder) in.
  3. Pick quality — 80 is the default and matches pngquant's `--quality=65-80` range.
  4. 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.

← All Melt tips