Yes, every PNG file is compressed. The question does png compress has a single answer: PNG always compresses its pixel data using a two stage process. The first stage is filtering, where each row of pixels is predicted from its neighbours and the difference is stored. The second stage runs DEFLATE (the same algorithm ZIP and zlib use) on the filtered bytes. Because the compression is lossless, the decoded pixels are identical to the original. Yet you can have two PNG files the same size where one is 50 KB and the other is 5 MB. The difference is not whether compression happens but how well it works.

How PNG Compression Works

A PNG encoder examines each row of pixels and picks one of five filter types: None, Sub, Up, Average, or Paeth. Each filter tries to guess the value of a pixel from the pixels above it or to its left. The encoder stores the difference between the prediction and the actual pixel. When the prediction is correct, the difference is zero. DEFLATE then compresses the whole stream of filtered bytes. Zeros compress to almost nothing. This is how does png compress images: not by discarding data but by rewriting the image so that compression algorithms can find long runs of repeated values.

Why Screenshots Are Tiny

A screenshot of a user interface has flat colour, sharp edges, and repeated patterns. The filter predicts each pixel exactly. The differences are mostly zero. DEFLATE sees long runs of zero bytes and reduces the file to a fraction of its raw size.

Why Photographs Are Huge

A photograph taken with a digital camera contains sensor noise. Every pixel differs slightly from its neighbours. The filter cannot predict the noise, so the differences are small random numbers. Random numbers do not compress. PNG compression explained in one sentence: the same lossless mechanism that makes a button shrink to 2 KB makes a sunset turn into 8 MB.

Is PNG Already Compressed? Yes. So Why is My File Still Enormous?

Is png compressed. The answer is always yes. The file is enormous because the image content fights the compressor instead of helping it. A photograph contains millions of unique pixel colours arranged in patterns that look random to any filter. DEFLATE cannot find repeated sequences in random data, so the file stays close to its raw size. JPEG avoids this by being lossy: it throws away high frequency detail the eye barely sees before compressing. PNG cannot do that because it promised exact pixels. The mechanism that predicts pixels fails on photographic noise, and that failure is the whole reason your photo PNG is ten times the size of the same JPEG.

Colour Types and Bit Depth: Hidden Size Traps

PNG 8 uses an indexed palette of up to 256 colours. PNG 24 stores 16.7 million colours as separate red, green, and blue channels. PNG 32 adds an 8 bit alpha channel for transparency. Bit depths of 1, 2, 4, 8, and 16 bits per channel exist. A 16 bit export carries twice the data of 8 bit, and the extra colour precision is invisible on a screen. Palette PNGs store transparency in a tRNS chunk with one alpha value per palette entry. Adam7 interlacing makes the image load progressively but always increases file size. Metadata chunks including tEXt, iTXt, eXIf, and iCCP colour profiles can be stripped losslessly.

What Lossless Optimisation Actually Does

Lossless optimisation searches every row for the best filter, runs DEFLATE at maximum effort, and strips unused metadata. The decoded pixels are identical to the original. Typical saving is 5 to 15 per cent. On an already optimised file the saving is zero. A correct tool will return the original if re encoding would produce a larger file. The cheapest order to reduce a PNG is: strip metadata losslessly, then reduce the palette in steps, then reduce dimensions, then change format.

Palette Reduction: the Lossy Option That Actually Works

Tools like pngquant and TinyPNG rebuild the image from an adaptive palette of 256, 128, or 64 colours chosen from the colours actually present. Two things happen. Each pixel needs 7 or 8 bits instead of 24 or 32. Thousands of near identical shades collapse into one entry, creating exactly the repetition DEFLATE feeds on. A UI screenshot drops 70 to 85 per cent. A logo or icon drops 60 to 80 per cent. A chart or diagram drops 70 to 80 per cent. An illustration with gradients drops 40 to 65 per cent. A photograph stored as PNG drops 40 to 70 per cent. An already optimised PNG drops zero per cent. Lossless only savings for the same types are 5 to 15 per cent and 0 to 5 per cent for a photograph.

Failure Mode: Banding and Fringing

Banding appears in smooth gradients because a soft fade needs many closely spaced colours to look continuous. A stair step fringe on semi transparent edges happens when the soft alpha band around a rounded logo snaps into discrete steps. The problem is worst on curves and diagonals. A gentler palette setting fixes it.

Palette Reduction Cannot Be Undone

Keep the original and compress a copy. Compressing an already palette reduced file again gives a worse result than going to the low colour count once, because the second pass chooses from an already impoverished set. Lossless re compression is safe to repeat.

Format Comparison: PNG vs JPEG vs WebP

A photograph as PNG is roughly ten times the size of the same photo as JPEG at a quality difference invisible at normal viewing distance. JPEG has no alpha channel. Converting a transparent PNG to JPEG flattens transparency onto a solid colour, usually white. JPEG handles sharp edges badly, producing ringing around text and lines, and on flat artwork often produces a larger file than PNG. WebP supports full alpha like PNG. Google's published figure for WebP lossless is about 26 per cent smaller than PNG. WebP is supported by all current browsers. Some older desktop applications still cannot open it.

Typical Savings by Image Type

Image TypeLossless OptimisationPalette Reduction
UI Screenshot5 15%70 85%
Logo, Icon, Line Art5 15%60 80%
Chart or Diagram5 15%70 80%
Illustration with Gradients5 15%40 65%
Photograph as PNG0 5%40 70%
Already Optimised PNG0%0%