Free · no signup · never uploaded
Compress PNG
Make a PNG smaller by storing fewer colours — the only thing that actually shrinks a lossless format. Transparency is preserved exactly.
Drop a PNG here
or drop your file here.
Nothing is uploaded — it stays on your device.
Runs in your browser — your file is never uploaded.
Add an image, then press "Compress image".
Short answer
To compress a PNG, drop it below and pick a colour budget. PNG is lossless, so there is no quality slider — re-saving alone will not shrink it. Storing fewer distinct colours is what makes a PNG smaller, and on logos, icons and screenshots the change is usually invisible. Transparency is always preserved, and it all runs in your browser.
Why PNG has no quality slider
Every JPG compressor gives you a quality percentage. PNG compressors do not, and the reason is that PNG is a losslessformat — it is required to reproduce your pixels exactly. There is no dial for “discard a bit more detail” because discarding detail is not something PNG is allowed to do.
This has a consequence people find surprising: re-saving a PNG often does not shrink it, and can produce a file slightly larger than the one you started with, simply because a different encoder made different filtering choices. If a tool tells you it saved 0% — or worse, claims a saving it did not make — that is what happened. This one reports the real number either way, even when it is negative.
What actually shrinks a PNG
PNG stores its data through DEFLATE, the same compression as a zip file, and DEFLATE gets its wins from repetition. The fewer distinct colours an image contains, the longer its runs of identical bytes, and the harder DEFLATE can squeeze it. So the lever is not quality — it is the size of the palette.
A median-cutalgorithm groups the image’s colours into clusters and maps every pixel to its nearest cluster average. This is the same family of technique behind pngquant and TinyPNG, and on the images PNG is genuinely good at it is close to free: a logo with 40 distinct colours capped at 256 loses literally nothing, while the file still shrinks because of how the data is packed.
Transparency is never touched
Only the red, green and blue values are reduced. The alpha channel is copied through byte for byte, which matters most at the edges: the semi-transparent pixels around a curve are what make a logo look smooth on any background, and quantising those is what makes a compressed logo look jagged and cheap. That never happens here.
Is your PNG really a photograph?
If so, no amount of PNG compression will help as much as changing format. A photo stored as PNG is routinely five to ten times larger than the same photo as a JPG at quality nobody can tell apart. Run it through PNG to JPG instead — unless you need the transparency, in which case stay here and use 256 colours.
Related
- Keep transparency — how alpha survives compression.
- Without losing quality — what lossless really means here.
- Compress any image — JPG, PNG or WebP.
PNG colour budgets and what they cost
| Colour budget | Colours stored | What it does |
|---|---|---|
| Original colours | All (up to 16.7M) | Lossless — often no smaller at all |
| 256 colours | 256 | Near-identical to the eye |
| 128 colours | 128 | Slight banding in smooth gradients |
| 64 colours | 64 | Visible banding, strong saving |
| 32 colours | 32 | Poster-like — flat areas only |
PNG has no quality setting because it is lossless — re-saving one at its original colours cannot discard anything, and may even produce a slightly larger file than you started with. Storing fewer distinct colours is the only lever that genuinely shrinks a PNG: it creates long repeated runs for PNG's internal DEFLATE compressor to squeeze. Photographs need 256 colours to look right; flat graphics, logos and screenshots often survive 64 or even 32 with no visible change.
How we calculate this
PNG compression runs locally in your browser — here is exactly how:
- Decode. the PNG is decoded to a bitmap with createImageBitmap and drawn to a canvas — never uploaded to any server.
- Read the pixels. the raw RGBA bytes are read back with getImageData, giving four values per pixel to work on directly.
- Cluster the colours. a median-cut algorithm repeatedly splits the set of distinct colours along whichever channel is most spread out, until it has at most your chosen number of clusters. Each cluster's average becomes one palette entry — the same family of approach pngquant uses.
- Map every pixel. each pixel is replaced by its nearest palette colour by squared RGB distance, memoised per distinct source colour so a 12-megapixel image does not need billions of comparisons. Alpha is copied through completely untouched, which is what keeps soft edges soft instead of jagged.
- Encode. the reduced pixels go back to the canvas and out through canvas.toBlob as a PNG. The encode itself is lossless — all of the saving came from the colour reduction, because the resulting long repeated runs are what PNG's internal DEFLATE compressor squeezes.
Assumptions
- Everything runs client-side; large images are limited only by your device's memory.
- Transparency is always preserved — the alpha channel is never quantised.
- At the 'Original colours' setting the file is re-encoded losslessly and may come out the same size or slightly larger. The tool reports that honestly rather than claiming a saving.
- Pixel dimensions are never changed; compression alters storage, not size on screen.
Sources
Last reviewed: July 21, 2026
Frequently asked questions
Why did my PNG not get smaller?+
Because PNG is lossless. At the 'Original colours' setting there is nothing to throw away, so the file is simply re-encoded — and a different encoder can easily produce a file a little larger than the one you started with. To actually shrink a PNG you have to reduce its colour budget. Pick 256 or 128 colours and the size usually drops sharply.
Is transparency preserved?+
Yes, always. The alpha channel is copied through completely untouched — only the red, green and blue values are reduced. That is deliberate: quantising alpha is what turns a soft anti-aliased edge into a jagged one, so it is never done here.
How many colours should I choose?+
It depends entirely on the image. Logos, icons, screenshots and flat illustrations often survive 64 or even 32 colours with no visible change, because they contain few distinct colours to begin with. Photographs saved as PNG need 256 to avoid obvious banding in skies and skin tones — and are usually better off as a JPG anyway.
Are my images uploaded to a server?+
No. Decoding, colour reduction and re-encoding all happen inside your browser tab using the canvas API. Nothing is transmitted, which is why the tool still works with your network disconnected.
Does this change the image dimensions?+
No. A 2000 × 1500 PNG stays 2000 × 1500 — compression changes how the pixels are stored, not how many exist. Resize first and then compress when you need the largest possible reduction.
Should my image be a PNG at all?+
PNG is the right choice for transparency, sharp edges, text and flat colour. It is the wrong choice for photographs — a photo stored as PNG is often five to ten times larger than the same photo as a JPG at indistinguishable quality. If your PNG is a photograph, converting it to JPG will beat any amount of PNG compression.
Is the colour reduction reversible?+
Not in the exported file — the discarded colours are gone from it permanently. Your source PNG on disk is never modified, so you can always start again from the original and pick a higher colour budget.
Related tools
PNGs are compressed entirely in your browser and never uploaded. Reducing colours is permanent in the exported file; your original PNG on disk is never modified.