Compress PNG File Size Online — Why the Quality Slider Works Differently
PNG is a lossless format. That single fact changes everything about how compression works compared to JPEG. There's no quality factor in the JPEG sense — no way to say "discard 30% of the detail and make the file smaller." What you can do is reduce the number of colors stored in the file. That's what the quality slider actually controls here, and it's the same technique that makes pngquant and TinyPNG effective.
Color quantization: what's actually happening
PNG files can store up to 16 million colors (24-bit RGB) or over 4 billion with an alpha channel (32-bit RGBA). Most real-world PNG images don't actually use anywhere near that many distinct colors, but they're encoded as if they might. Color quantization analyzes the actual colors in your image and reduces the palette to a smaller set — 256, 128, 64, or 32 colors — by replacing each pixel's exact color with the closest available color in the reduced palette.
The quality slider maps to palette size: 95%+ keeps the full lossless encoding (no quantization, just better deflate compression), 80%+ uses 256 colors, 60%+ drops to 128, 40%+ uses 64, and anything below 40% uses a 32-color palette. A photographic PNG at 128 colors will show subtle banding in smooth gradients if you look closely. A logo or icon with flat colors looks nearly identical at 32 colors as it does at full color — which is why quantization works so well for that type of content.
The tool uses UPNG.js for this process, which runs entirely client-side in your browser. UPNG.js implements the same quantization algorithm that pngquant uses — median-cut color space partitioning — so results are comparable to what you'd get from command-line pngquant without installing anything. Transparency is preserved fully through the quantization process: the alpha channel is part of the RGBA data that gets quantized, so semi-transparent edges stay semi-transparent.
When PNG compression isn't enough and you should switch to WebP
Quantization has a ceiling. A complex photograph stored as PNG at 256 colors will still be much larger than the same photo stored as a WebP at 80% quality, because WebP uses lossy VP8 encoding that achieves compression ratios PNG fundamentally can't match. If you're compressing a PNG and the output is still above 500KB, switching the output format to WebP will typically cut that in half or better. The WebP option on this tool preserves transparency, so you can convert a transparent PNG logo to WebP without losing the alpha channel.
The tradeoff is compatibility. WebP is supported by all modern browsers — Chrome, Firefox, Safari 14+, Edge — but older desktop applications, some email clients, and certain CMS platforms may not handle it. For anything going on a modern website, WebP is the better choice. For anything going into a Word document, Slack, or legacy software, stay with PNG.
The size-check fallback and when files don't get smaller
After quantization, the tool checks whether the output is actually smaller than your input. If it isn't — which can happen with small PNGs, already-optimized files, or images with very few colors — it steps down through smaller palette sizes (64, 32, 16 colors) until it finds one that beats the original. As a last resort it runs a lossless UPNG deflate pass and then falls back to the browser's native PNG encoder. If none of these produce a smaller file, it returns your original. You won't download a PNG that got bigger.
Files are processed entirely in-browser. Nothing is uploaded. For converting PNG to other formats, see Convert to PNG or the general image compressor for multi-format batch jobs. The background remover is useful if you need a transparent PNG before compressing.
What to look for when reviewing compressed PNG output
Check gradients first — any area where color transitions smoothly from one shade to another is where quantization artifacts appear most. A blue-to-purple gradient in a background might develop visible banding at 32 or 64 colors. Flat-color areas are fine at any palette size. If you're compressing a PNG icon or logo, you can often go as low as 32 colors without a visible difference. If you're compressing a photograph stored as PNG, 256 colors is the minimum worth considering — and for photos specifically, converting to WebP or JPEG will usually give you a better file size at equivalent visual quality than any quantization setting can achieve. The preview updates in real time, so compare input and output sizes and zoom in before committing to a download.