Compress PNG
Shrink PNG files with lossy colour reduction or lossless re-encoding, transparency preserved.
To compress a PNG, drop the file on Kilnfile's Compress PNG tool, choose the Lossy method (default) and a colour count, click Compress PNG and download the result. Lossy mode reduces the palette to up to 256 colours, which often makes screenshots and graphics 60 to 80% smaller. Transparency is kept, and files are processed in your browser.
How do I compress a PNG file?
- Drop your PNG files onto the drop zone, or click to browse.
- Choose a Method: Lossy (reduce colours, much smaller) or Lossless (re-encode only).
- In lossy mode, set Colours. 256 is usually indistinguishable from the original; try 64 for flat graphics.
- Click Compress PNG.
- Download each file, or Download all as ZIP for a batch.
PNG is a lossless format, which is why a 1920 by 1080 screenshot can weigh 2 to 4 MB while the same picture as a JPG is a few hundred kilobytes. Compress PNG attacks that from two directions. Lossy mode runs the pixels through UPNG.js colour quantisation, which builds a palette of up to 256 colours and maps every pixel to its nearest match. The result is an 8 bit indexed PNG instead of a 32 bit RGBA one, so each pixel takes one byte rather than four before the deflate stage even starts.
For screenshots, UI mockups, logos, charts and anything with flat areas of colour, that quantisation typically cuts the file by 60 to 80% with no visible change at the default 256 colours. Dropping Colours to 128 or 64 saves a little more and still looks clean on graphics with a limited palette. Photographs and soft gradients are the exception: with only 256 colours you may see faint banding, so keep the count at 256 or use Compress JPG for photos.
Lossless mode skips quantisation and simply re-encodes the image. The gains are modest, often 5 to 20%, because most PNGs are already reasonably well compressed, but the pixels are bit for bit identical to the original. Choose it when you need exact colours, for example brand assets that must match a hex value, or images that will be edited again.
Alpha transparency survives both modes. In lossy mode the palette includes transparency values, so semi-transparent edges and drop shadows are preserved rather than flattened onto a background. The tool does not resize; pair it with Resize Image if your PNG is also far larger in pixels than it needs to be.
Every step runs on your device. Decoding uses createImageBitmap in a Web Worker, quantisation and encoding happen in that same worker, and the finished file is handed straight back to your browser as a download. Nothing is uploaded, there is no queue and no file count limit.
How it works: this tool uses your browser's Canvas and WebCodecs APIs, plus libheif for HEIC. No server is involved, so Kilnfile never sees your file. Last reviewed 20 September 2026.
Frequently asked questions
Why is my PNG so large in the first place?
PNG stores every pixel losslessly, usually with four channels of 8 bits each. High resolution screenshots and images exported from design tools therefore run to several megabytes even when they contain only a handful of colours. Reducing the palette is what makes them small.
Will lossy compression make my PNG look worse?
For screenshots, icons and graphics with flat colour, 256 colours is visually identical in almost every case. Photos or images with smooth gradients can show slight banding. Use Lossless mode if you are unsure, and compare the download with the original.
Does it keep transparency?
Yes. Both methods preserve the alpha channel, including semi-transparent pixels along soft edges. Your logo will still sit cleanly on any background.
Is this the same as TinyPNG?
It uses the same basic idea, colour quantisation to an 8 bit palette, which is where most of TinyPNG's savings come from. The difference is that Kilnfile does the work in your browser rather than on a server, so files never leave your device and there is no monthly limit.
Can I compress a whole folder of PNGs?
Drop as many files as you like in one go. They are processed one after another in a worker, and when there is more than one result you can Download all as ZIP.
Cite this page: “Compress PNG Online Free, Keeps Transparency”, Kilnfile, https://kilnfile.com/image/compress-png/
Related tools
Guides
- How to compress images for a websiteResize, then compress: the two-step routine that cuts web images by 60 to 80 percent with no visible loss. JPG, PNG and WebP settings that actually work.
- Image formats explained: JPG, PNG, WebP, HEIC and SVGWhich image format to use and when. JPG, PNG, WebP, HEIC, SVG, GIF and AVIF compared on size, quality, transparency and support, with real numbers.