ToolPilot

PNG Color Reducer

Shrink PNG files by cutting their color count. Drop up to 500 at once, tune the settings on the first one, and process everything in your browser.

Drop your PNG files here

or click to browse your device

PNG only · up to 500 files per batch

Shrink a PNG by cutting its color count

Why reduce colors instead of "compressing"?

PNG is a lossless format: its DEFLATE stream gives back the exact pixels you put in. Running a PNG through a compressor again buys you almost nothing — it is already packed as tightly as its encoding allows. At the same dimensions, the only lever left is how much information each pixel carries, which comes down to the number of colors.

A truecolor PNG with transparency spends 32 bits per pixel before compression. The PNG specification defines another mode, color type 3: pixels no longer carry a color but an index into a palette of at most 256 entries, stored in 8 bits — or 4, 2, even 1 bit when the palette is shorter. Going from 32 to 8 bits divides the data handed to DEFLATE by four, and repeating the same indices gives the compressor far better material to work with.

Screenshots, logos, icons, diagrams and flat illustrations rarely hold more than a few dozen genuinely distinct shades, so the reduction usually passes unnoticed. That is exactly what the preview is for: check the first image, then commit the other 499.

Who this tool is for

Front-end developers
Icons, logos and UI screenshots committed to a repository weigh on the bundle and on every clone. A pass at 16 or 32 colors keeps flat artwork crisp while dropping to 4 or 5 bits per pixel, and that lands straight on Largest Contentful Paint, whose "good" Core Web Vitals threshold sits at 2.5 seconds.
Technical writers and documentation teams
A user manual or a step-by-step tutorial piles up hundreds of screenshots. They all share the same interface theme, so they respond the same way: set the palette on the first one, apply it to the other 499, and skip the file-by-file grind.
Designers and product teams
Figma, Sketch and Illustrator always export 32-bit RGBA PNGs, even for a twelve-color mockup. Trimming the palette before sending a board out for review keeps attachments and Slack threads light, without going back into the design tool.
Site owners and SEO leads
Images remain the heaviest part of a typical page. When PNG is the format you are stuck with — transparency, crisp text, a screenshot — palette reduction is the only way to cut the weight without switching formats or cropping dimensions, and therefore without touching what visitors see.
Support and QA teams
Screenshots attached to tickets and test reports stack up by the hundred in issue trackers. A batch pass before upload reclaims storage without turning interface labels into mush, since quantization preserves the contrast of flat areas.

How it works

Each image is first tallied into a histogram of its colors. The palette is then built by median cut, the algorithm Paul Heckbert published at SIGGRAPH in 1982: start with one box holding every color, and on each round split the box whose spread weighs most, along its widest channel, at its population median. Every final box yields one palette entry — the weighted average of the colors it holds.

Pixels are then matched to the closest entry in a space where the channels are premultiplied by alpha; without that, a transparent pixel could inherit the color of an opaque entry of the same hue. With dithering on, each pixel's rounding error is spread over its neighbors using the Floyd–Steinberg coefficients (1976), scanning in alternating directions, so gradients stop breaking into bands.

The image is finally rewritten as a color type 3 PNG: a PLTE chunk carries the palette, a tRNS chunk carries per-entry opacity when the image needs it, and the bit depth is picked as tightly as the palette allows. Scanlines are written unfiltered — on a palette image the bytes are entry numbers, and their difference means nothing — then zlib-compressed by the browser itself. Everything runs on your machine.

Frequently asked questions

How is this different from a regular image compressor?
A regular compressor re-encodes to JPEG or WebP, two lossy formats that smear sharp edges — precisely what you do not want on a screenshot or a logo — and JPEG drops transparency entirely. Here the file stays a PNG: edges stay razor-sharp, transparency survives, and the only thing that changes is how many shades are available.
How many colors should I pick?
It depends entirely on the image, which is what the preview is for. In practice: 2 to 16 colors cover an icon, a monochrome logo or a line diagram; 32 to 64 suit most interface screenshots; 128 to 256 become necessary as soon as gradients, drop shadows or photography are involved. The tool reports how many colors the source actually contains — if that is already below your setting, the palette is not padded out.
Is transparency preserved?
Yes, at full depth. The tRNS chunk of a palette PNG gives each entry its own opacity from 0 to 255, so drop shadows and anti-aliased edges come through intact — unlike GIF, which only knows all-or-nothing transparency. Fully transparent pixels are even pooled into a dedicated entry, so an invisible area can never turn visible.
Why does a file sometimes come out larger than it went in?
Two reasons. Either the source was already an optimized palette PNG, in which case there is little left to win and re-encoding can cost a few bytes. Or dithering is turned up: it replaces flat areas with scattered pixels, that noise breaks the repetition DEFLATE feeds on, and the file grows. The per-file percentage flags it — lower the dithering, or keep the original.
Are my images sent to a server?
No. Decoding, quantization and PNG writing all happen inside your browser, in JavaScript. None of your files leave your device, nothing is uploaded, and nothing survives closing the tab. That is also why there is no per-file size limit: your machine's memory decides, not a server quota.