To compress PNG images, cut their colors down to a smaller palette or run them through a lossless optimizer, because a PNG is already compressed and only shrinks further when you change what it stores. A palette-quantized logo can drop 70 percent or more with its transparency fully intact. A browser tool does it in seconds, nothing to install and no signup.
That is the short answer. The longer one is worth having, because PNG is the format people bring to imagecompressor.tools with the most confusion attached. I built and run the compressor here, and the same questions repeat: why is this screenshot bigger than a photo, does compressing it hurt quality, and what do PNG-8 and PNG-24 even mean. This page is the hub for the format. It covers what a PNG is, how its compression works, the color modes, transparency, why files balloon, the levers that shrink them with real before and after numbers, and the cases where PNG is the wrong choice and you should switch formats instead.
Here is the map. Every row is a section below.
| If you have | The move |
|---|---|
| A logo, icon, or flat-color graphic | Reduce colors to a palette (PNG-8), keep alpha |
| A screenshot that is too big | Strip metadata, re-optimize losslessly, or drop to a palette |
| A photo saved as a PNG | Stop. Convert it to JPEG or WebP |
| A graphic you serve on the web | Try lossless WebP, usually smaller than PNG |
| A PNG that must hit a KB limit | Palette-reduce, then resize the dimensions |
What is a PNG, and is it already compressed?
Yes, a PNG is already compressed, always, using lossless compression: decode the file and you get back the exact pixels that went in, every time. That single fact answers the question most tools skip and decides everything else about shrinking one. There is no such thing as a raw, uncompressed PNG, so "compressing" a PNG never means switching compression on. It means making the data it stores more compressible, or storing less of it.
PNG, short for Portable Network Graphics, is a raster image format and an open standard, published as ISO/IEC 15948:2004 and maintained as a W3C Recommendation, with a third edition released on June 24, 2025 that added official support for APNG animation, HDR, and Exif metadata (Wikipedia on PNG). The MIME type is image/png, the extension is .png, and every major browser renders it fully (MDN image format guide).
Where the lossless guarantee makes PNG the right format
That lossless guarantee decides where PNG belongs. Text stays readable at one pixel of stroke width. A chart keeps its hairlines. A logo's edge stays clean against any background, because PNG also carries a full alpha channel, meaning per-pixel transparency. JPEG can do none of this without smearing, because its compression was tuned for the soft gradients of photographs. The two formats are less rivals than a split shift: JPEG takes the photos, PNG takes the graphics.
How PNG compression works: filtering and DEFLATE
PNG compression runs in two stages, both fully reversible: a prediction filter rewrites each row of pixels as differences from its neighbors, then DEFLATE packs those differences down. Neither stage throws information away, which is the whole contract of the format and the reason the pixels never degrade behind your back.
Stage one: prediction filters
The filtering stage is the clever part. Before compression, each scanline, one horizontal row of the image, is transformed by one of five filter types. A filter predicts each byte from the bytes near it and stores only the difference, and the encoder picks the best filter per row.
| Filter | Predicts each byte from | Where it wins |
|---|---|---|
| None | Nothing, bytes stored raw | Noisy or already random data |
| Sub | The byte to its left | Horizontal gradients |
| Up | The byte directly above | Vertical gradients |
| Average | The mean of left and above | Smooth blends both ways |
| Paeth | Left, above, or upper left | Mixed content |
On a screenshot, long stretches of most rows match the row above exactly, so the differences come out as runs of zeros, and zeros compress beautifully. That is why a screenshot of flat interface panels can be smaller than a thumbnail of a beach.
Stage two: DEFLATE
Stage two is DEFLATE, the same non-patented algorithm behind ZIP and gzip: LZ77 finds repeated byte sequences and replaces them with back references, then Huffman coding gives the shortest codes to the most common symbols, and nearly everything implements it through the zlib library. This is the machinery a browser PNG compressor drives, and because both stages are reversible, the same pixels come back every time.
The consequence worth internalizing: how small a PNG gets depends entirely on how predictable its pixels are. Flat color and repeated patterns nearly vanish. Photographic noise, which no filter can predict and no dictionary can match, barely compresses at all. Hold onto that, because it explains both why some PNGs are enormous and why the fix is sometimes a different format entirely.
PNG-8 vs PNG-24 vs PNG-32: color modes and file size
The single biggest lever on a PNG's size is its color mode, and there are three names worth knowing: PNG-8, PNG-24, and PNG-32. They describe how many colors the file can hold, and dropping from one to the next is where most real savings live. The format actually defines five color types (grayscale, truecolor, indexed, grayscale with alpha, and truecolor with alpha) at bit depths from 1 to 16, giving an overall color depth from 1 to 64 bits per pixel.
| Name | What it stores | Colors | Best for |
|---|---|---|---|
| PNG-8 | Indexed palette, optional alpha | Up to 256 | Logos, icons, flat graphics |
| PNG-24 | Truecolor, no alpha | ~16 million | Detailed graphics, no transparency |
| PNG-32 | Truecolor plus alpha | ~16 million plus transparency | Detailed graphics with soft edges |
Why the palette matters so much
An indexed "PNG-8" image stores a small color table and then one short index per pixel instead of a full color value per pixel. For a logo that only uses a dozen shades, that is a massive reduction in what each pixel costs. A common and expensive mistake is a tool saving a simple graphic as PNG-24 truecolor when 8-bit palette color would have been visually identical, which needlessly inflates the file. If your PNG is bloated, the first thing to check is whether it is truecolor when it did not need to be. The deeper diagnosis lives in why PNG files get so large.
PNG-8 can still be transparent
One myth worth killing: PNG-8 is not stuck being opaque. Indexed PNGs can carry per-palette-entry 8-bit alpha, so a palette image can hold full transparency. A good palette-quantizer preserves that alpha while it cuts colors, which is exactly why palette reduction is the safe first move for graphics that need a clean edge.
How to compress PNG files without wrecking them
The reliable way to compress PNG files is a three-step workflow: normalize the image, reduce its colors to a palette, then squeeze what is left losslessly. Each step targets a different source of size, and done in order they compound. A browser tool automates the lossless parts of this sequence, so in practice you drop the file and read the result, but knowing all three steps tells you what each one buys and when a graphic needs a dedicated palette quantizer.
Step 1: strip what the image does not need
PNG files carry ancillary chunks: embedded color profiles, text, and metadata that add bytes without changing a pixel. Stripping redundant chunks and normalizing to sRGB is the cheap first win, and it is fully lossless (Unified Image Tools on PNG optimization). On this tool, metadata including any embedded thumbnail is removed by default.
Step 2: reduce the colors to a palette
This is the heavy lever. Converting a truecolor PNG to an optimized palette is what tools like pngquant do, using a modified median-cut algorithm refined with k-means and adaptive dithering, preserving full alpha transparency, and it often cuts file size by as much as 70 percent. It is technically lossy, because you are choosing fewer colors, but on flat graphics the result is usually indistinguishable from the original.
Step 3: re-optimize the DEFLATE pass losslessly
The final step is a lossless re-squeeze. Tools such as oxipng re-run the filtering and DEFLATE stages with harder settings to find a smaller encoding without changing a single pixel. It is the step that changes nothing you can see and still shaves bytes, so there is no reason to skip it. When you reduce PNG file size this way, the pixels are identical and only the encoding got tighter. For a step-by-step walkthrough of the browser route, the spoke on how to compress a PNG goes button by button.
How much smaller does PNG compression get?
Palette reduction is where the dramatic numbers come from: the pngquant project documents its own reference file dropping from 75,628 bytes to 19,996 bytes, about 74 percent smaller, with transparency preserved (pngquant project). Lossless-only optimization saves less, a chunk-strip and DEFLATE re-pass, but it never risks a color. The two are additive, and the split below shows what each buys.
| PNG state | File size | Versus original |
|---|---|---|
| Truecolor PNG, as saved | 73.9 KB (75,628 bytes) | baseline |
| Palette-quantized, alpha kept | 19.5 KB (19,996 bytes) | about 74% smaller |
Your own mileage depends entirely on the image, which is the honest caveat every uncited color-count table on the web leaves out. A photograph saved as PNG will barely move, because there is no flat color to quantize. A two-tone icon can beat 90 percent. The rule that predicts the result is the one from the mechanism section: the more predictable and flat the pixels, the more they compress.
Does compressing a PNG keep its transparency?
Yes, when you use the right tool. Palette quantization can preserve the full alpha channel, so a logo comes out with the same clean edge it went in with. The danger is not palette reduction. It is a tool that quietly changes the format on you.
The transparency trap to watch for
Here is the trap I see people fall into. Some popular "compress PNG" tools output a JPEG, and JPEG has no transparency, so every transparent pixel gets filled, usually with white, and your logo now has a white box around it. If a compressor asks nothing about format and hands back a much smaller file that suddenly has a background, it converted your PNG to JPEG. For anything that has to sit on a colored page, confirm the output is still a PNG or a lossless WebP. The dedicated route for this is compressing a PNG without losing transparency, and the same care applies when you save a Discord emoji as PNG instead of the WebP the app hands you.
PNG vs JPEG, WebP, and AVIF: which format when?
For photographs, PNG is the wrong format and JPEG, WebP, or AVIF will be far smaller; for sharp-edged graphics, PNG is right, but lossless WebP is usually smaller still. That is the whole decision in one sentence, and it matters because choosing the format is often a bigger win than any setting inside PNG. Using PNG for a photo causes a large increase in file size for negligible quality gain.
| Format | Compression | Best for | Note |
|---|---|---|---|
| PNG | Lossless, palette optional | Logos, icons, text, screenshots | Transparency, exact pixels |
| JPEG | Lossy | Photographs | No transparency |
| WebP | Lossy and lossless | Web graphics and photos | Lossless ~26% under PNG |
| AVIF | Lossy and lossless | Maximum savings | Slower to encode |
When lossless WebP beats PNG
For the same graphic with the same sharp edges and transparency, a lossless WebP is around 26 percent smaller than the equivalent PNG. If you control where the image is served and support is not a worry, that is a free quarter off with no visible change. The modern-format tradeoffs, including where support still bites, live in the sibling pillar on WebP and AVIF. If you would rather stay in raster formats you can compare directly, PNG vs JPG lays out the choice for one image at a time, and converting an image to PNG covers going the other way.
When PNG is the wrong format
The most common cause of a giant PNG is a photograph that should never have been one. A camera photo saved as PNG can be several times larger than the same shot as a quality-80 JPEG, and it will look identical, because PNG has to store every grain of photographic noise losslessly while JPEG throws away exactly the detail your eye cannot see. No PNG optimizer rescues this. The fix is a format change.
How to spot a photo hiding in a PNG
If a single PNG is measured in megabytes and it is a photograph or a screenshot of one, that is the tell. Convert it. PNG to JPG is the right move for a photo headed somewhere that does not need transparency, and PNG to WebP is the modern choice where you control the destination. Going the other way, WebP to PNG restores a lossless copy when a tool insists on a PNG. When you genuinely need the smallest possible PNG-family file for a graphic, the roundup of the best PNG compressors compares the tools head to head.
The arithmetic of a mis-saved photo
The numbers make the point better than any warning. A typical phone photo lands around 4.5 MB as a camera JPEG and comes back near 900 KB at quality 80, roughly 80 percent smaller, with no visible change. Save that same photo as a PNG and it does not shrink at all, because there is no flat color for the palette step to collapse and no visible detail for a lossless pass to remove. You are storing every speck of sensor noise at full fidelity, so the PNG can sit several times larger than the JPEG while looking identical on screen. That is not the PNG format failing. It is the format doing exactly its job on a file that never should have been handed to it. The lever that helps here is not a slider inside PNG, it is the dropdown that changes the format.
One habit that prevents most PNG bloat
Decide the format before you save, not after. If the image has soft photographic gradients, it wants a lossy format. If it has sharp edges, flat color, text, or transparency, it wants PNG, and a palette-reduced one at that. Getting the choice right at save time avoids the whole rescue operation later, and it is the cheapest thing you can do to keep image files small.
Its sibling pillar, JPEG explained, covers the lossy side of this coin in full, which is the format most of these mis-saved PNGs should have been.
Where to go next with PNG
This page is the hub for the PNG format. Each spoke below goes deeper than a hub should, so pick the one that matches the file in front of you.
- How to compress a PNG is the button-by-button browser walkthrough.
- Why PNG files are so large diagnoses the bloat before you fix it.
- Compress a PNG without losing transparency keeps the clean edge.
- Best PNG compressors, compared is the tool roundup with real tradeoffs.
- PNG vs JPG settles the format choice for one image.
The neighboring pillars cover the formats on either side: JPEG for photographs, and WebP and AVIF for the modern formats that often beat both.