Palette + oxipng · alpha kept

PNG compressor

Drop a batch of PNGs and get much smaller files that keep their transparency. Compare each result with the original at any zoom, then download one file or a ZIP.

Runs in this tab. Nothing is uploaded.

Drop PNG files here

or pick them from your device. Pasting an image works too.

Settings

Mode
256
75%

Smooths gradients with fine noise. Turn it off for flat graphics and pixel art.

oxipng effort

Text, dates and EXIF are dropped; the colour profile and DPI are kept.

How the PNG compressor works

Most PNGs are saved as full 24-bit or 32-bit colour even when the picture uses far fewer distinct colours. This compressor builds a palette of at most the number of colours you choose, maps every pixel to its closest palette entry and writes an indexed PNG, which is often 50–80% smaller for screenshots, logos and illustrations. Transparency travels with the palette, so soft edges and drop shadows survive.

The palette comes from a median cut followed by a few k-means refinement rounds, done in premultiplied colour space so that semi-transparent pixels are matched by how they actually look. Fully transparent pixels always keep an entry of their own.

The optional second pass runs oxipng, a lossless optimiser compiled to WebAssembly, which tries different row filters and compression settings and keeps the smallest. If a result would not be smaller than your original, the original is kept.

What the settings do

Colours
The palette size. 256 looks identical to the original for most screenshots, logos and illustrations; 64–128 often still does for flat artwork.
Dithering
Scatters neighbouring palette colours to imitate shades in between. It hides banding in gradients but adds noise and a few bytes.
Lossless only
Keeps every pixel exactly: the file is re-encoded in the smallest exact format and optimised, with metadata removed.

Photos rarely suit PNG at all. For those, a JPEG, WebP or AVIF from AVIF Cove will be far smaller.

More PNG tools

Each one runs entirely on your device.

Questions

Are my PNGs uploaded anywhere?

No. Decoding, palette reduction and the oxipng pass all run in background workers in this browser tab, and the oxipng WebAssembly file is loaded from this site. Your images never leave your device, and the compressor keeps working offline once the page has loaded.

Is the compression lossy or lossless?

Palette mode is lossy: it reduces the image to the number of colours you pick, which is where most of the saving comes from. If the image already has that few colours, nothing is lost. Lossless only mode never changes a pixel; it only re-encodes and optimises the file.

Will transparency survive?

Yes. Every palette entry carries its own alpha value, fully transparent pixels get an exact transparent entry, and semi-transparent pixels are matched in premultiplied colour, so anti-aliased edges and shadows stay smooth.

How many colours should I choose?

Start at 256 and lower it while watching the comparison at 100% or 200%. Logos, icons and flat illustrations often look the same at 32–128 colours. Photos and smooth gradients need 256 and dithering, and may still show banding.

Why did a file not get smaller?

Some PNGs are already palette images that were optimised well. When the result is not smaller, the original is kept so you never download a bigger file. Animated PNGs keep their frames untouched and only lose their metadata.

What happens to metadata?

Text chunks, timestamps and EXIF are dropped. The colour profile (iCCP, sRGB, gAMA, cHRM) and the pixel density (pHYs) are kept, so colours and print size stay the same.