What PNG Compressor Does
Reduces PNG file weight using browser-side 8-bit indexed color palette quantization (16 to 256 colors) while retaining alpha transparency.
Step-by-Step Instructions
- Upload a PNG, WebP, or static GIF graphic.
- Select maximum palette colors (256 colors preserves the richest gradients; 64–128 shrinks flat UI graphics further).
- Click Compress PNG and inspect the Before/After comparison and byte savings.
How It Works in Your Browser
Samples pixel frequencies in your browser, selects up to 256 representative RGBA palette entries, maps pixels to nearest palette indices, and writes a valid indexed-color PNG (`IHDR` color type 3 + `PLTE` + `tRNS` + DEFLATE `IDAT`) using `CompressionStream`.
Quality Considerations & Common Mistakes
Flat illustrations, UI captures, and icons with limited colors often drop 40%–70% in byte size with minimal visible difference at 128–256 palette colors.
- Compressing noisy camera photos as PNG instead of converting to WebP or JPEG.