Make PNG files smaller without losing transparency
PNG is the go-to format for logos, screenshots, icons and anything with a transparent background — but a full-colour PNG stores three or four bytes for every pixel and quickly grows to several megabytes. This PNG compressor shrinks them the way professional optimisers do: it reduces the image to a carefully chosen palette of up to 256 colours, which typically cuts the size by 50–80% while keeping smooth edges and transparency.
If every pixel must stay exactly as it is, switch to Lossless mode to re-pack the file with a better PNG filter and remove hidden metadata instead. You can compress many images at once, compare each result with the original using a slider, and download everything as a ZIP. Nothing is uploaded: the work happens on your own device.
How to use the PNG Compressor
- Drop PNG files on the upload area, click it to choose them, or paste a screenshot with Ctrl+V.
- Keep Lossy · fewer colours for the biggest savings, or pick Lossless for pixel-identical output.
- In lossy mode, set the number of Colours and decide whether to keep dithering on.
- Click a file in the list and drag the divider, or zoom to 200%, to check edges and gradients.
- Download a single PNG from its row, or use Download all to get a ZIP.
PNG Compressor features
Real colour quantisation
Images are reduced to 2–256 colours with UPNG.js, which splits the colour space along its direction of greatest variance to pick a palette that fits your image.
Transparency preserved
Alpha is part of every palette colour, so soft shadows and anti-aliased edges keep their partial transparency instead of turning jagged.
Optional dithering
Floyd–Steinberg error diffusion hides banding in gradients and photos; switch it off for flat artwork to get smaller files.
Lossless mode
Tries several standard PNG filters and keeps the smallest result, switches to a palette when an image has 256 colours or fewer, and drops text and timestamp chunks.
Animated PNG support
APNG files are decoded frame by frame and saved as APNG again, with one shared palette and the original frame timing.
Never bigger
If the compressed file would be larger than the original, the original is kept, so a batch can only get smaller.
How lossy PNG compression works
PNG itself is always lossless: it stores pixels exactly and squeezes them with DEFLATE, the same algorithm ZIP uses. The “lossy” part happens before saving. A photo-like PNG may contain tens of thousands of distinct colours; quantisation replaces them with a palette of at most 256, so each pixel needs one byte instead of three or four, and the repeated values compress far better.
The palette is not a fixed set of web colours. It is built from your image by repeatedly splitting the group of pixels with the most colour variation, then every pixel is mapped to its nearest palette entry. Each palette entry can carry its own transparency (stored in the PNG tRNS chunk), which is why semi-transparent pixels survive.
How many colours do you need?
Start at 256 and lower the number while watching the comparison. The table is a rough guide; images vary.
| Colours | Good for | Dithering |
|---|---|---|
| 256 | Screenshots with gradients, illustrations, photos stored as PNG | On |
| 64–128 | App and website screenshots, charts with shading | Optional |
| 16–32 | Logos, icons, flat illustrations, diagrams | Off |
| 2–8 | Line art, scanned signatures, QR codes, black-and-white text | Off |
Lossless mode and what it changes
Lossless mode does not alter what you see. It tries several PNG filters and keeps whichever compresses best, converts it to a palette or drops an unused alpha channel when that loses nothing, and clears colour values hidden under fully transparent pixels. Text, timestamp, EXIF and colour-profile chunks are removed. Images with 16 bits per channel are saved with 8 bits per channel, the depth browsers and most screens display.
For photographs, a different format usually beats any PNG: the JPG compressor or the WebP compressor will often produce a file a fraction of the size. For logos drawn as vectors, the SVG compressor keeps them sharp at every size.
PNG Compressor FAQ
How do I compress a PNG without losing quality?
Choose Lossless mode. The PNG compressor then re-packs the image more efficiently and removes metadata, so every visible pixel stays identical. For larger savings, lossy mode at 256 colours with dithering is usually indistinguishable on screen.
Does compressing a PNG keep the transparent background?
Yes. Both modes keep transparency, including partially transparent edges and shadows, because every palette colour stores its own alpha value.
Why did my PNG barely get smaller?
It may already use a palette or be well optimised, in which case the original is kept. Photos saved as PNG shrink much more as JPG or WebP, and reducing the max width or height also helps.
What does dithering do?
Dithering scatters pixels of neighbouring palette colours so gradients look smooth instead of showing bands. It makes files slightly larger, so turn it off for flat graphics where it is not needed.
Can I compress animated PNG (APNG) files?
Yes. All frames are decoded, reduced to one shared palette and saved as an animated PNG with the original timing.
Are my images uploaded to a server?
No. Decoding, quantisation and encoding run in your browser with the open-source UPNG.js and pako libraries (MIT licence). Your files stay on your device.