Language
English English Vietnamese (Tiếng Việt) Vietnamese (Tiếng Việt) Chinese (简体中文) Chinese (简体中文) Portuguese (Brazil) (Português do Brasil) Portuguese (Brazil) (Português do Brasil) Spanish (Español) Spanish (Español) Indonesian (Bahasa Indonesia) Indonesian (Bahasa Indonesia)
Compress PNG

Compress PNG

Compress and optimize PNG images by reducing color palette while preserving transparency.

Compress PNG Images

PNG is the go-to format for logos, icons, screenshots, and any graphic that needs crisp edges or transparency. The catch is file size — PNG keeps every pixel lossless, which can balloon into very large files. This tool shrinks PNGs by reducing the color palette with a median-cut quantization algorithm, cutting file size dramatically while keeping the alpha transparency channel fully intact.

100% private: every image is processed directly in your browser using the HTML canvas. Nothing is uploaded to a server, so your graphics never leave your device.

Common Use Cases

Logos & Icons

Trim the weight of flat-color graphics and UI icons without losing their transparent backgrounds.

Web Graphics

Speed up pages by serving lighter PNG assets while preserving sharp edges and clarity.

Bulk Optimization

Compress up to 20 PNG files at once and download them all in a single ZIP archive.

How to Compress a PNG

1

Add Your Images

Drag and drop PNG files onto the upload zone, click to browse your device, or paste an image straight from the clipboard. You can load up to 20 images in a single batch.

2

Set the Color Count

Drag the slider to choose how many colors to keep, from 2 up to 256. Fewer colors mean smaller files; more colors preserve smooth gradients and subtle shading.

3

Preview & Compare

Open the side-by-side preview to compare the original and compressed versions and confirm the percentage saved before downloading.

4

Download

Save each compressed image individually, or use Download All (ZIP) to grab the entire batch in one click.

Tip: Flat graphics and illustrations with few distinct colors compress the most. Photographs saved as PNG benefit more from converting to JPEG or WebP.

Features

Palette Reduction

A 2–256 color slider powered by median-cut quantization lets you balance file size against image fidelity.

Transparency Preserved

The alpha channel stays intact, so transparent backgrounds and soft edges remain exactly as they were.

Batch Compression

Process up to 20 images in one go and export them together as a ZIP archive.

Fully Browser-Based

No uploads, no sign-up, no waiting. Everything runs locally for total privacy and instant results.

Color Count Guide

ColorsResultBest For
256Maximum palette, best qualityDetailed images, gradients
128Good balance for most imagesGeneral-purpose graphics
64Smaller files, some banding may appearSimple illustrations
16Very small files, heavy quantizationFlat icons, line art

Frequently Asked Questions

Does PNG compression preserve transparency?

Yes. The compression reduces the number of colors but keeps the alpha transparency channel fully intact, so transparent backgrounds and soft edges are unaffected.

What color count should I use?

128 colors works well for most images. Use higher values (256) for graphics with smooth gradients, and lower values (16–64) for simple icons and illustrations with only a few distinct colors.

How does palette reduction shrink the file?

A median-cut algorithm picks the most representative colors and maps every pixel to the nearest one. With fewer unique colors, PNG's lossless compression can pack the data far more efficiently, producing a smaller file.

Are my images uploaded to a server?

No. All compression happens entirely in your browser. Your images never leave your device, which makes the tool safe even for private graphics and screenshots.

Should I use PNG or JPEG for photos?

For photographs, JPEG or WebP usually produce much smaller files at the same visual quality. Keep PNG for graphics that need transparency, sharp edges, or perfectly flat color areas.

Drop images here or click to browse
PNG
PNG compression reduces colors while preserving transparency
128 colors is a good default for most images with acceptable quality
Use higher color counts for images with smooth gradients
Want to learn more? Read documentation →
1/4
Can't find it? Build your own tool with AI
Start typing to search...
Searching...
No results found
Try searching with different keywords