How cutting colors shrinks a PNG
A normal PNG stores full color for every pixel: red, green, blue and, if it has transparency, an alpha value. That allows millions of possible colors, even when the image only uses a handful. An indexed PNG works differently. It keeps a palette of up to 256 colors, and each pixel simply points to one of them. Each pixel then needs one byte instead of three or four, and the repeating patterns compress much better.
For a screenshot of an app, a logo or a flat illustration, reducing to 256 colors or fewer usually makes no visible difference, while the file often shrinks to a fraction of its original size.
How to use it
- Add your PNG files. Other image formats are accepted too; the output is always PNG.
- Choose the number of colors: 256, 128, 64, 32 or 16.
- Leave dithering on (the default) or turn it off.
- Compare the result with the before/after slider, which shows the first file, and check the new size of each file.
- Download each PNG, or all of them in a ZIP.
The work is done in your browser, so your images are not uploaded.
Choosing the color count
| Colors | Works well for |
|---|---|
| 256 | Screenshots, illustrations with gradients, most logos; start here |
| 128 or 64 | Flat graphics, interface elements, charts with few colors |
| 32 or 16 | Simple icons, line art, diagrams, text-heavy images |
Fewer colors give smaller files, but only up to the point where the image starts to change. Use the preview slider to find the lowest count at which you cannot see a difference.
Dithering and banding
When there are not enough colors for a smooth gradient, it breaks into visible stripes, an effect called banding. Dithering hides this by mixing pixels of neighboring colors in a fine pattern, which the eye blends into a smooth transition. Keep it on for gradients, shadows and anything photographic.
Try turning dithering off for flat graphics such as logos, icons and diagrams. They have no gradients to protect, and without the dither pattern the flat areas stay perfectly clean and the file is often a little smaller.
When this is the wrong tool
Photos are full of subtle shades. Reducing them to a palette can cause visible banding or a grainy look, especially at 64 colors or fewer. For photos, convert to JPG with PNG to JPG or to WebP instead; you will get much smaller files with better quality. The PNG vs JPG guide explains which format suits which kind of image.
Frequently asked questions
Is this lossless compression?
Not entirely. The file is still a PNG, but reducing the number of colors changes some pixels. At 256 colors with dithering, the change is usually invisible on screenshots and graphics.
Is transparency kept?
Yes. The palette includes transparency values, so transparent and semi-transparent areas are preserved.
How is this different from Compress image?
Compress image also reduces PNG colors, automatically, to at most 256. This tool lets you choose the color count and the dithering yourself, with a visual comparison.
Why does my photo look grainy after compressing?
The image needs more colors than you allowed. Try 256 colors with dithering on, or save photos as JPG or WebP instead.