Compress PNG
Compress PNG images by reducing the number of colours they contain — the same technique desktop optimisers use. Transparency is preserved, files typically shrink 40–70%, and everything runs in your browser.
- Files never leave your device
- Free, no signup
- No watermarks
- Works offline once loaded
How to compress png
- 1
Add your PNGs
Drag PNG files onto the page, browse for them, or paste from the clipboard.
- 2
Choose a colour count
256 colours is visually lossless for most graphics. Lower it for smaller files.
- 3
Download
Save each optimised PNG or download the batch as a ZIP.
Why a lossless format still compresses
PNG stores every pixel exactly, so it cannot discard detail the way JPEG does. What it can do is exploit repetition. Each row is first passed through a filter that encodes pixels as differences from their neighbours, and the result is then compressed with DEFLATE — the same algorithm as ZIP. Both stages reward predictability: the more often the same byte pattern recurs, the harder the file packs.
Reducing the number of distinct colours is what creates that predictability. A screenshot straight from a phone can contain forty thousand subtly different shades, most of them one-pixel variations invisible to anyone. Collapsing those into a palette of 256 carefully chosen colours changes almost nothing perceptually while making the pixel data dramatically more repetitive, and DEFLATE then does the rest. The container stays lossless; the image inside it is simplified first.
This is why PNG optimisation results vary so sharply by content. A logo with eight flat colours is already near the palette limit and may barely shrink. A gradient-heavy UI screenshot can lose 60% of its size with no visible change at all.
Choosing a colour count
The right palette size depends entirely on how much continuous tone the image contains. Flat graphics survive brutal reduction because they never had many colours to begin with; anything with gradients, shadows or photographic content needs headroom or it will band — the smooth ramp breaks into visible steps.
Dithering is the mitigation. It scatters the rounding error across neighbouring pixels so the eye blends them back into a smooth gradient instead of seeing hard edges between palette entries. It costs a few percent of file size because it makes the data slightly less repetitive, which is precisely the trade: a little size back in exchange for gradients that hold together. Leave it on for anything photographic, turn it off for flat graphics where it only adds noise.
- 256 colours
- Visually lossless for almost everything, including most screenshots. The safe default when you are not sure.
- 128 colours
- Indistinguishable on logos, icons and UI screenshots. Roughly halves the file. The best default for web assets.
- 64 colours
- Fine for flat illustrations and icons. Photographs and gradients will band visibly at this level even with dithering.
When PNG is the wrong choice
PNG is frequently used for images that should never have been PNG. A photograph saved as PNG is typically five to ten times larger than the same photograph as a quality-85 JPEG, and no amount of palette reduction closes that gap — the format is simply not built for continuous tone. If the image came out of a camera and has no transparency, converting it is a far bigger win than compressing it.
The reverse mistake is just as common. Screenshots containing text, logos with hard edges, and line art all look poor as JPEG at any reasonable quality, because the frequency-based transform smears sharp boundaries and leaves haloes around lettering. Those belong in PNG, where they are often smaller than the JPEG anyway as well as being pixel-exact.
- Keep it PNG
- Logos, icons, line art, screenshots of text, diagrams, and anything requiring a transparent background.
- Convert to JPG or WebP
- Photographs, and any full-colour image with no transparency. The saving is measured in multiples, not percentages.
Frequently asked questions
How does PNG compression work if PNG is lossless?
The PNG container stays lossless — what changes is the image inside it. Reducing the number of distinct colours makes the data far more repetitive, and PNG's built-in deflate compression then packs it much harder. This is the same approach pngquant and TinyPNG use.
Is transparency preserved?
Yes. The alpha channel is left completely untouched, and fully transparent pixels are excluded from the colour palette so they cannot skew it. Logos and cut-out graphics keep clean edges.
Why is the saving smaller than TinyPNG gives me?
Browsers can only write 32-bit PNGs, not true 8-bit palette PNGs, so we capture roughly half of what a native optimiser achieves. In exchange your file never leaves your device and there is no monthly limit. For logos and flat graphics the gap is small; for photographs it is larger.
What does dithering do?
It scatters the rounding error between neighbouring pixels so gradients stay smooth instead of forming visible bands. It costs a few percent of file size and is worth leaving on for photographs and gradients — turn it off for flat graphics and screenshots.
Should I use PNG at all?
For photographs, no — JPG or WebP will be several times smaller at the same quality. PNG is the right choice for logos, icons, screenshots of text and anything needing transparency.
Common compress png tasks
You might also need
Compress JPG
Shrink JPG files without visible quality loss
PNG to JPG
Convert PNG images to smaller JPG files
Resize Image
Change image dimensions by pixels or percentage
WebP Converter
Convert images to and from WebP
Background Remover
Cut the background out of any photo, right in your browser
Color Palette Extractor
Pull the dominant colors out of an image
Crop Image
Drag to crop, with aspect ratio presets
Favicon Generator
Every favicon size plus the HTML to install it