Why PNG Files Are So Large (and What to Do About It)
A PNG keeps every pixel exactly. That is its strength and the reason a photo saved as PNG can weigh many megabytes.
By the Universal Image Compressor Team
The cost of keeping every pixel
PNG is a lossless format. It promises that the image you open is identical, pixel for pixel, to the image that was saved. That promise is valuable for screenshots, logos and graphics, where a blurred edge or a changed color would be a defect. But the promise has a price: the encoder is not allowed to simplify anything, so the file must contain enough information to rebuild every single pixel.
A photograph from a phone has around twelve million pixels, each with a slightly different color because of texture, light and sensor noise. Written losslessly, that is a lot of data, and a photo saved as PNG easily reaches 15 to 30 MB, while the same photo as a JPEG at a good quality is often 2 to 5 MB.
How PNG compresses
PNG compresses in two steps. First, a filter predicts each pixel from the pixels next to it and stores only the difference. In smooth or repetitive areas, the differences are small or zero. Second, the filtered data is compressed with DEFLATE, the same family of methods used in ZIP files, which replaces repeated patterns with short references.
This works well when the picture has large flat areas and sharp transitions, as in a screenshot, a diagram or a logo. It works badly when the picture is full of fine variation, like a photo of grass or a face, because there are few repeated patterns to exploit and the differences between neighboring pixels stay large.
What makes a PNG big or small
Several factors decide the size. The number of pixels is the first: a retina screenshot has four times as many pixels as the same screen at normal density. The amount of detail is the second: a flat user interface compresses well, a photo does not. Color depth is the third: a PNG can use 8 bits per channel, 16 bits per channel or a palette of at most 256 colors, and the palette version is much smaller but can only show a limited number of colors.
Transparency adds an alpha channel, which increases the data. Embedded metadata such as color profiles and text chunks adds a little. Interlacing, which lets a picture appear gradually, usually makes the file slightly larger.
Photos as PNG: the biggest problem
The most common reason for oversized pages is a photograph saved as PNG. This often happens by accident, for example when a screenshot tool or an editor defaults to PNG, or when someone exports a picture with a transparent background that does not need transparency. Converting such a file to JPEG or WebP typically reduces its size by 70 to 90 percent, with a quality that is hard to tell apart at normal viewing size.
When you convert a PNG with transparency to JPEG, transparent areas become solid, and the compressor fills them with white. If you need the transparency, use WebP, which supports it, or keep PNG for that image.
Making a PNG smaller without losing detail
There are lossless optimizers that try harder to find patterns, remove unnecessary chunks and choose better filters. They usually save 5 to 20 percent. Do not expect miracles: since the data must remain identical, there is a limit. Because this tool re-encodes images with the browser's own PNG encoder, it does not match specialized optimizers, and it will tell you when the result is not smaller than your original by keeping the original.
For graphics with few colors, converting to an indexed palette of 256 colors or fewer can shrink a PNG a lot. Specialized tools do this with a technique called quantization, which is technically lossy, but not visibly so for simple graphics. A canvas cannot create such a palette, which is why this tool does not offer it.
Smaller PNGs by changing the image
The most effective changes are about the image, not the format. Reduce the pixel dimensions, for example by saving a retina screenshot at half size. Crop away empty or unimportant areas. Remove transparency if it is not needed. Reduce noise and gradients in graphics, because flat colors compress better. Each of these makes the pattern easier for the encoder.
If the image is a screenshot with mostly text and flat colors, lossless WebP can be around a quarter smaller than PNG according to Google, which is a free win if your audience uses a browser that supports it (this compressor writes lossy WebP only, so use a dedicated tool for lossless).
When PNG is still the right choice
PNG remains the right format for logos, icons, line art, interface screenshots and any picture with sharp edges or text, where lossy artifacts would be visible, and for images that you will edit again. It is supported everywhere, and it never degrades when saved again.
Use it where it fits, and use JPEG or WebP for photographs. If you are not sure, add the file to the compressor and try the options: the list shows the size of each variant, and you can decide with real numbers.
A quick experiment
To see the effect for yourself, take a photograph that you have as a PNG and add it to the compressor with the output format set to JPEG and then to WebP. Look at the size in the list for each variant. For a typical photo, the drop is dramatic, from many megabytes to a few megabytes or less, and to a few hundred kilobytes if you also reduce the maximum size. Then try a screenshot of an app: the result is usually much smaller, but text may look slightly softer at low quality.
This is the practical lesson of the article: the format and the content of the picture matter more than any single setting, and a thirty-second test shows what is possible for your own files.
Convert heavy PNG photos to JPEG or WebP with the free image compressor.
Open the image compressor