How to Compress PNG Online Free

Learn how to compress png online, including quality settings, file-size tradeoffs, and practical troubleshooting tips.

Shrink a PNG in your browser without quality loss by quantizing colors and stripping metadata, or convert photographic PNGs to JPG or WebP for a much smaller file. No upload, no sign-up, no watermark.

How to Compress PNG Online Free

A complete step-by-step guide to reducing PNG image file sizes while preserving quality and transparency - instantly, for free, right in your browser.

Last updated:

GoalMake a PNG smaller
PNG isLossless by design
Biggest winConvert photos to JPG or WebP
WhereIn your browser

A PNG is lossless. Every pixel it stores is exact, which is why it is the right format for screenshots, logos, icons, text, and anything with a transparent background. Nothing is thrown away, so it never has the blocky artifacts of a JPG.

That strength is also why PNGs get large. Since it will not discard detail, the only honest way to shrink a PNG is to store the same picture more cleverly, or to reduce how many distinct colors it holds. And if the PNG is actually a photograph, the real answer is usually a different format entirely. This guide explains the two-stage compression PNG actually uses, why palette reduction is such a powerful lever, and where the format's limits lie.

PNG is lossless, so compression works differently

PNG, the Portable Network Graphics format, was created in the mid-1990s as a patent-free replacement for GIF and is defined by RFC 2083 and the W3C PNG specification.[1] By design it is entirely lossless: the pixels you decode are bit-for-bit identical to the pixels that were encoded. There is no quality slider, because there is no quality to lose. That makes "compressing a PNG" a fundamentally different task from compressing a JPG. You are not choosing how much detail to throw away; you are choosing how efficiently to store detail you must keep.

Because of that, the same image saved by different tools can differ in size while looking pixel-for-pixel identical. The difference is entirely in how cleverly each encoder packed the data, not in what the data is.

The short version

You cannot lower a PNG's quality to shrink it. You shrink it by better packing, fewer colors, or by converting photos to a lossy format.

Inside PNG: filtering and DEFLATE

PNG compresses in two stages, and understanding them explains why some PNGs shrink dramatically and others barely move.[2]

The first stage is filtering, also called prediction. Before any compression, PNG processes the image one row at a time and, for each row, predicts each pixel from its already-seen neighbors, typically the pixel to the left and the pixel directly above. It then stores only the difference between the prediction and the true value. For smooth gradients and flat regions, those differences are mostly zero or very small, which packs down beautifully. PNG defines five filter types (None, Sub, Up, Average, and Paeth), and a good encoder can choose a different filter for every single row to minimize the data. This per-row filter selection is one of the biggest reasons two encoders produce different file sizes from the same image.

The second stage is DEFLATE, the same general-purpose compression used in zip files, which combines LZ77 back-referencing (replacing repeated byte sequences with pointers to earlier ones) with Huffman coding. DEFLATE works best on the filtered data because filtering has already turned the image into long runs of small, repetitive numbers. This is why images with large flat areas, sharp edges, and limited color, exactly the content PNG is meant for, compress so much better than noisy photographic detail. It is also why raising the encoder's compression effort can find a smaller file at the cost of more processing time, without ever changing a pixel.

Palette reduction and bit depth

Beyond filtering, the largest lossless saving usually comes from the palette. A truecolor PNG (often called PNG-24, or PNG-32 with transparency) stores full 24-bit color for every pixel, so each pixel costs three or four bytes before compression. But many images, especially logos, icons, and flat graphics, use only a handful of distinct colors. PNG supports an indexed color mode (PNG-8) that stores a palette of up to 256 colors once, then represents each pixel as a small index into that palette. For suitable images this alone can cut the file to a fraction of its truecolor size while staying perfectly exact, because the image genuinely contained no more than those colors.

PNG also supports lower bit depths: an image can be stored at 1, 2, 4, or 8 bits per pixel in indexed mode. A two-color logo needs only 1 bit per pixel, a decision that shrinks it far below a naive 8-bit palette. The important boundary is honesty: if an image truly uses only 200 colors, moving it to an indexed palette is lossless. If it uses thousands of subtly different shades, as photographs do, forcing it into 256 palette entries is no longer lossless and will introduce banding.

Shrink a PNG without losing quality

These changes keep a PNG exact for the content they suit. Use them before you consider changing formats.

MethodWhat it doesBest for
Palette quantizationPNG-24 down to PNG-8 indexed colorsLogos, icons, flat graphics
Metadata strippingDrops color profiles and editor tagsAny PNG, always safe
Re-filteringFinds the best lossless packingAny PNG, no visible change
ResizingFewer pixels to storeImages shown smaller than saved
Watch out

Quantizing a photograph to a small palette will show banding in skies and skin. Keep quantization for flat-color art, and handle photos with a format built for them.

Transparency deserves a note, because it interacts with palette reduction. PNG supports a full 8-bit alpha channel, meaning each pixel can be anywhere from fully transparent to fully opaque, which is how a soft drop shadow or an anti-aliased edge fades cleanly into any background. Reducing such an image to a small indexed palette can force those smooth transparency gradients into a few discrete levels, hardening a soft edge into a jagged one. When an image relies on soft transparency, either keep it as truecolor PNG with full alpha or use a lossy optimizer that is careful about the alpha channel; do not push it into a tiny palette and expect the edge to survive.

Compress a PNG, step by step

  1. Open the tool and add your PNG

    Open the FileFormer image converter and drop your PNG in. It runs on your device, so nothing is uploaded.

  2. Reduce colors where it is safe

    If the image is flat graphics or an icon, quantize the palette. Compare against the original and stop if you see banding.

  3. Strip what you do not need

    Remove embedded metadata and profiles. This is always lossless and often trims a surprising amount from small files.

  4. Export, or convert a photo

    Download the leaner PNG. If it is a photograph, convert to JPG or WebP instead for a far smaller result.

Lossy PNG tools and how they cheat

You may have seen tools that promise a much smaller PNG than plain re-packing achieves. What they actually do is quietly stop being lossless. A "lossy PNG" optimizer runs a color quantization step: it analyzes the image, picks an optimized palette of, say, 256 colors that best represents it, and maps every pixel to the nearest palette entry, then stores the result as an ordinary, standards-compliant indexed PNG. The output is still a valid PNG that any viewer can open, but it is no longer identical to the input.

These tools work remarkably well on illustrations, UI graphics, and images with soft transparency, where a carefully chosen palette is nearly indistinguishable from full color. They fall apart on the same content plain quantization struggles with: smooth photographic gradients, where the reduced palette shows as visible banding in skies and skin. The key is to understand what is happening. When such a tool claims a huge saving with "no visible loss," it has traded exact fidelity for a smaller palette, and whether that trade is invisible depends entirely on the picture.

Watch out

A "lossy PNG" is really a quantized PNG. It is excellent for flat art and dangerous for photographs. Always compare against the original before trusting a large reported saving.

Why two encoders give different sizes

One of the most surprising facts about PNG is that the same image, saved losslessly by two different tools, can produce files that differ in size by a wide margin while decoding to pixel-for-pixel identical results. The image is the same; only the packing differs. This happens because the PNG specification leaves the encoder considerable freedom in how it prepares the data, and different tools exploit that freedom to different degrees.[1]

The two big levers are filter selection and DEFLATE effort. Recall that PNG can choose one of five filters per row; a lazy encoder might apply a single filter to the whole image, while a thorough one tries every filter on every row and keeps whichever yields the most compressible result. Likewise, DEFLATE can be run quickly or with an exhaustive search for longer back-references and better Huffman tables. Dedicated PNG optimizers push both levers to their limit and sometimes swap in a stronger DEFLATE-compatible compressor entirely, which is why running a graphic through an optimizer after export can shave off a further slice with no change to a single pixel. The takeaway is practical: if a PNG feels larger than it should, the encoder that made it, not the image, is usually the reason, and re-encoding it through a better optimizer costs nothing in quality.

Interlacing and the size it costs

PNG supports an optional interlacing scheme, called Adam7, which stores the image as seven interleaved passes so that a rough version of the whole picture appears early while the rest streams in. It is the still-image equivalent of a progressively loading photo, and it was more useful in the dial-up era than it is today. The relevant fact for compression is that interlacing almost always makes the file larger, often noticeably so, because scattering the pixels across seven passes breaks up the long runs of similar data that filtering and DEFLATE depend on.

Unless you specifically need the progressive-load behavior, saving a PNG without interlacing produces a smaller file that compresses more efficiently. Many editors enable interlacing by default or leave it on from a previous save, so checking that it is off is a quick, entirely lossless way to trim a PNG. As with metadata stripping, this changes nothing about the pixels; it only removes overhead the image did not need.

Right method for real situations

Because PNG holds several different jobs, the correct compression method depends entirely on what the image actually is. A few common cases make the choice concrete.

Image typeBest approach
Logo or icon, few colorsQuantize to an indexed palette at the lowest bit depth that holds all its colors. Huge, lossless saving.
UI screenshot with textKeep PNG for crisp text; strip metadata and re-filter. Avoid heavy quantization, which muddies edges.
Flat illustration with soft edgesA lossy PNG optimizer (quantization) usually looks identical and cuts size sharply.
Photograph saved as PNGConvert to JPG or WebP; PNG is the wrong format and will always be larger.
Graphic with transparencyKeep PNG for its full alpha channel, then quantize or optimize losslessly on top.

The unifying rule is to match the tool to the content. Palette reduction is a superpower on flat, few-color art and a liability on photographs. Lossless re-packing and metadata stripping are safe everywhere but only save a lot where there was overhead to remove. And no amount of PNG optimization will beat simply moving photographic content into a format designed to discard the detail a photo can spare.

When to convert instead of compress

PNG and photographs are a poor match. A full-color photo saved as PNG can be several times larger than the same photo as a JPG, with no visible benefit, because PNG refuses to discard the fine detail a photo can spare. Its lossless DEFLATE stage has almost nothing to exploit in a noisy photographic image, where adjacent pixels differ constantly and filtering cannot produce long runs of zeros. For that content, converting to JPG or WebP is the single biggest saving available.

Keep the image as a PNG only when you actually need what PNG uniquely provides: a transparent background with full 8-bit alpha, crisp sharp edges, or perfectly legible text and screenshots. If none of those apply and the picture is photographic, a lossy format is the correct choice, not a bigger PNG. Modern WebP is worth special mention, because it offers both a lossless mode that often beats PNG on the same graphics and a lossy mode for photos, covering both jobs in one format where browser support allows.

Optimize your PNG now

Quantize colors, strip metadata, or convert to a lighter format, all in your browser with nothing uploaded.

Open the image converter

Key takeaways

  • PNG is lossless, so you shrink it by better packing, not by lowering quality.
  • Palette quantization to PNG-8 is a big win for flat graphics and icons.
  • Stripping metadata is always safe and can trim small files noticeably.
  • For photographs, convert to JPG or WebP; keep PNG for transparency, edges, and text.

References

  1. PNG Specification (Third Edition) - W3C
  2. RFC 2083: PNG (Portable Network Graphics) Specification Version 1.0 - IETF