Image Size Reducer
Quantizer

Quantize a PNG

Reduce an image to a fixed palette of 256 colors or fewer, with optional dithering to keep gradients looking smooth. The preview updates as you move the color count.

  • Palette set anywhere from 2 to 256 colors
  • Dithering to protect gradients
  • Transparency maintained
  • Live preview as colors are removed
  • Processed entirely in the browser
Open the quantizer

A Palette, Chosen Deliberately

A full-color image can hold millions of tones. Quantization replaces them with a list you specify, and most photographs only ever needed a fraction of them.

A photograph straight from a camera might contain a few hundred thousand distinct colors, and a flat piece of vector artwork might contain twelve. Both are stored the same way by default, which means the artwork is carrying an enormous amount of unused capacity around with it. Quantization is the operation that closes that gap. It examines the image, chooses a limited set of colors that represent it well, and stores each pixel as an index into that list rather than as a full value. Quantize a PNG and the file often falls to a small fraction of its former size, because what is being removed is not detail but the freedom to use colors the picture never contained.

What the Quantizer Does

A color count you choose, dithering when gradients need it, and a live result with transparency handled honestly.

Color count control

Set the palette anywhere from a handful of colors up to the two hundred and fifty-six that an indexed file can hold.

Dithering option

Enable ordered mixing of neighboring palette entries to keep gradients readable at normal viewing size.

Live preview

See the effect of each change as it happens, which is the only reliable way to find the lowest count that still looks right.

Transparency handled

Empty areas stay empty, with the limitation on partial transparency made clear rather than hidden.

Local processing

The image is read in the browser, so nothing is uploaded.

ImageSizeReducer

ImageSizeReducer

@imagesizereducer

How a palette is chosen

The hard part is deciding which colors to keep. A naive approach, sampling the image at random or taking the two hundred and fifty-six most frequent values, produces a poor result because a smooth background can consume most of the list while the detail in the subject is starved. Real quantizers use a clustering method instead. The colors present in the image are grouped by similarity, and each group is represented by its average, so the palette spreads itself across the whole picture in proportion to how much of it each region occupies. That is why, when you quantize a PNG, a photograph keeps its structure even at a low color count, and it is the reason the palette matters far more than the number of entries.
Quantize it
A photograph beside its color palette arranged as a grid of swatches
ImageSizeReducer

ImageSizeReducer

@imagesizereducer

Where the saving actually comes from

Three bytes per pixel becomes one. To quantize a PNG, each pixel stops carrying a full red, green, and blue value: an image of two thousand by two thousand pixels spends twelve megabytes on those values before any compression happens. Store the same pixels as indices into a two hundred and fifty-six entry palette and each one needs a single byte, so the raw data drops to a quarter of the size. Compression then works better as well, since repeated palette indices are easier to encode than repeated triples. The savings are largest on images with broad flat areas and smallest on photographic texture, where the palette has to work harder and dithering adds noise that compresses less well.
Quantize it
A comparison showing a full color image and its indexed equivalent with file sizes
ImageSizeReducer

ImageSizeReducer

@imagesizereducer

Dithering, and when to use it

A quantized gradient becomes a series of flat steps, and those steps are visible. Dithering addresses this by mixing pixels from the two nearest palette entries in a pattern, so the eye averages them into the shade that is wanted but missing. The trade is exact: dithering buys smoothness at the cost of grain. It works well on photographs viewed at normal size, where the eye merges the pattern and reads a continuous tone, and badly on anything that will be enlarged, where the pattern becomes an obvious texture. It is also pointless on flat artwork, since there are no gradients for it to fix. Adding it when a gradient looks banded, and leaving it off when it does not, is the whole rule when you quantize a PNG.
Quantize it
The same gradient quantized with and without dithering, shown together
ImageSizeReducer

ImageSizeReducer

@imagesizereducer

What happens to transparency

This is the detail that surprises people, and it is worth knowing before a design depends on it. An indexed PNG stores one palette entry per pixel, and the palette holds colors rather than opacity values, so transparency cannot be varied per pixel in the same way. In practice that means an indexed file supports fully transparent or fully opaque and nothing in between. A subject cut out from a background with soft hair, a soft shadow, or antialiased lettering will lose those gradual edges and pick up a hard, slightly jagged outline. For flat shapes and hard-edged artwork there is no problem at all. The rule of thumb is simple: if the file's edge quality matters, keep it in full color, and if it does not, quantize a PNG freely.
Quantize it
A soft-edged subject compared with a hard-edged one after color reduction
ImageSizeReducer

ImageSizeReducer

@imagesizereducer

Not the same as posterizing

The two operations are frequently confused because both reduce an image and both produce a stylised result. They act on different things. Posterizing leaves the number of colors alone and instead flattens each channel into a few levels, so a smooth gradient becomes visible bands no matter how rich the palette is. Quantizing does the opposite: it keeps every tone smooth and instead shrinks the list of available colors. A graded surface can still shade gradually after quantization, provided dithering is used, which is impossible after posterization. Deciding which one is wanted is simply a question of whether the problem is the palette or the transitions.
Quantize it
One image posterized and another quantized, side by side for comparison
ImageSizeReducer

ImageSizeReducer

@imagesizereducer

Icons, sprites, and pixel art

Game and interface assets are where the technique earns its keep. A sprite sheet may hold hundreds of small graphics, each with a small palette, and reducing them to indexed files can shrink a mobile build by megabytes with no visible change on screen. Pixel art is a special case, since the artist has already chosen a limited palette by hand. Running such an image through a quantizer at or above its original color count leaves it untouched, and only lowering the count below what the artwork uses starts to alter it. That makes it a safe final step, and a good way to enforce a shared palette across a set of assets drawn separately, whenever you quantize a PNG.
Quantize it
A sprite sheet of small graphics reduced to a shared palette
ImageSizeReducer

ImageSizeReducer

@imagesizereducer

When the picture suffers

Photographs with fine texture are the difficult case. Foliage, fabric, skin, and sand all rely on thousands of subtly different values, and a small palette has to represent each of them with a color that is visibly not quite right. Dithering masks the error by scattering it, which reads as grain rather than as a mistake. The genuinely bad outcome is a photograph pushed to a very low count, where the palette can no longer describe the subject and large areas collapse into flat regions that were never flat in the original. If the goal is a smaller file rather than a particular look, quantizing a PNG at two hundred and fifty-six colors is almost always a better answer than pushing the number lower.
Quantize it
A textured photograph reduced at a moderate and a very low color count
ImageSizeReducer

ImageSizeReducer

@imagesizereducer

Done on your own machine

Color reduction is applied to work in progress as often as to finished assets, and the files in question are frequently client material that has no business being uploaded anywhere. The processing runs in the browser from the file already on the machine. Nothing is sent to a server and no account is needed, so a color count can be tried, changed, and tried again without the artwork leaving the device.
Quantize it
A quantized image previewed inside a browser window

How to Quantize a PNG

Four steps. The second is where the quality trade is made, and the third is where gradients are rescued.

Step 1

Upload the image

Start from the best version available, since noise and compression artefacts give the palette extra work to do.

Step 2

Set the number of colors

Begin high and reduce until the picture starts to break up, then step back to the count before that point.

Step 3

Turn on dithering if needed

If smooth areas show visible steps, enable it. If the artwork is flat, leave it off, since there is nothing to fix.

Step 4

Check the edges and download

Look along any cut-out outline, since indexed files cannot hold a gradual edge, then save the reduced file.

Who Quantizes PNGs

Four kinds of work where a smaller palette pays off.

WD

Web developers

shipping lighter assets

Running icons and interface graphics through at 128 colors cuts a page weight noticeably with no visible change on screen. It has become a routine build step.

GD

Game developers

sprites and texture atlases

A shared palette across a whole atlas keeps a mobile build small. Enforcing it on artwork drawn by different people also makes the set look consistent.

PA

Pixel artists

limited palettes

Checking a piece at sixteen colors shows exactly where the palette is carrying too much weight. It is a fast way to tighten a drawing.

ED

Email designers

small, reliable images

Clients cap message size, so every kilobyte counts. Quantizing both shrinks the file and keeps the transparency the layout depends on.

Frequently Asked Questions

What color reduction changes, and how it differs from other ways of simplifying a file.

Keep the colors that matter

Upload a PNG, choose how many colors to keep, add dithering if a gradient needs it, and download a smaller file, all without leaving the browser.

Quantize it
Fewer Colors, Less Weight

Most images carry colors they never use

The default way to store a PNG gives every pixel the freedom to be any of sixteen million colors, and almost no image needs that freedom. A flat icon uses a dozen tones. A piece of pixel art may use sixteen on purpose. Even a photograph concentrates its values in a subset of the space, with the rest going unused. Quantization takes advantage of the gap by choosing a palette that suits the picture and storing an index rather than a full value for each pixel, and in doing so it often removes most of the file's weight without removing anything a viewer can see. The judgement is in two places. The palette itself decides how well the image survives, which is why the clustering method behind it matters more than the count, and why a well-chosen set of sixty-four colors beats a poorly chosen two hundred and fifty-six. The dithering decision decides whether gradients read as smooth or as grain, and it should be switched on only when steps are visible and switched off the moment they are not. One limitation is worth remembering throughout. An indexed file holds colors rather than opacity, so its transparency is a switch rather than a dial, and anything with a soft edge will lose it. Weigh that against the saving, pick a count rather than pushing it to the floor, and it becomes clear why so many workflows end with a step to quantize a PNG.

Smaller files, same picture.