How to compress a PNG for the web
PNG is the format you reach for when quality matters: screenshots, logos, diagrams, and anything with sharp text. The trouble is that PNG files are big — a single full-screen screenshot can be 2 or 3 MB, and a page full of them can take forever to load. The good news is that most PNGs can be made much smaller without losing the sharp edges that make PNG worth using in the first place.
Why PNG files are so big
PNG is a lossless format, which means it keeps every pixel exactly as it was. That is its great strength and its great weakness. A photograph saved as a PNG stores the colour of every single pixel with no shortcuts, so a 4000 by 3000 pixel photo can easily be 8 to 12 MB as a PNG, while the same photo as a JPG at 80% quality might be 1.5 MB. The PNG is bigger because it refuses to throw anything away.
For screenshots and graphics, the file sizes are smaller but still large by web standards. A full-screen screenshot at 1920 by 1080 pixels is often 1 to 3 MB as a PNG, depending on how much detail is on screen. A page with five screenshots could therefore be carrying 10 MB of images, which is slow to load on a mobile connection and expensive in bandwidth. And most of that size is unnecessary: a screenshot of a mostly white document with black text does not need millions of colours to look right.
Understanding why the file is big tells you how to shrink it. PNG size depends on three things: the dimensions of the image, the number of colours it uses, and how much detail is in it. Reduce any of those, and the file gets smaller — the skill is knowing which ones you can reduce without anyone noticing.
When PNG is the right choice — and when it is not
Before compressing, it is worth asking whether the image should be a PNG at all. PNG is the right format when the image has sharp edges, flat colours, text, or transparency: logos, icons, screenshots, diagrams, charts, and interface graphics. For those, PNG's lossless quality is exactly what you want, and no other format keeps text as crisp.
PNG is the wrong format for photographs. A photo has millions of subtly different colours, and PNG stores all of them, so the file is enormous for no visible benefit. If your image is a photograph — even a photograph inside a screenshot — convert it to JPG or WebP instead. A photo saved as JPG at 80% quality will typically be 70 to 80% smaller than the same photo as a PNG, and the difference is almost invisible.
A common middle case is a screenshot that contains both text and a photo, like a screenshot of a social media post. Here you have a choice: keep it as PNG for perfect text, or convert it to JPG or WebP for a much smaller file. If the text must be readable, keep the PNG and compress it with the methods below. If the text is secondary, try WebP at 85% quality — it often keeps text surprisingly readable at a fraction of the size.
Step by step: compress a PNG
- Start from the original. Always work from the original screenshot or graphic, not from a copy that has already been resized or converted. Keep a backup of the original before you begin.
- Resize to the size it will be displayed at. A screenshot taken on a 2560-pixel-wide monitor does not need to be displayed at 2560 pixels. If it will appear on a blog at 800 pixels wide, resize it to 800 or 1200 pixels wide first. Cutting the dimensions in half can cut the file size by more than half, and nobody will see the difference.
- Open the Image Compressor and add your PNG. The file is processed in your browser and never uploaded anywhere, so your screenshot stays on your own device.
- Choose your output format. If the image needs transparency or pixel-perfect text, keep it as PNG. If it is a screenshot without transparency, try converting it to WebP at 85% quality — the file will usually be 50 to 70% smaller, and the text will still read cleanly.
- Download the result and compare. Open the compressed file next to the original and zoom in on the text and edges. If the letters are still crisp and the edges are clean, the compression worked. Check the file size too: a full-screen screenshot that started at 2 MB should ideally come down to under 500 KB.
- Save the settings that worked. Once you find a combination that works for your screenshots — say, 1200 pixels wide, WebP at 85% — write it down and use it for every screenshot. Consistency makes the whole site look better.
Reduce the colours: the biggest win for graphics
For graphics, logos, and simple screenshots, the most powerful trick is reducing the number of colours. A standard PNG can store millions of colours, but a logo might only use five, and a screenshot of a document might use a few hundred. Saving such an image with a limited colour palette — often called an 8-bit or 256-colour PNG — can cut the file size by 50 to 70% with no visible change at all, because the colours that were removed were never in the image to begin with.
This works best for images with flat areas of colour: logos, icons, charts, diagrams, and screenshots of apps and documents. It works poorly for photographs and images with gradients, where reducing the colours creates visible banding — smooth skies and shadows turn into visible stripes. So use it selectively: if the image is mostly flat colour and sharp edges, reduce the palette; if it has gradients or photos, do not.
Many image tools offer this as a "reduce colours" or "posterise" option, and some compressors do it automatically when they detect that an image uses few colours. If your tool offers it, try it on a copy and compare the result with the original. When it works, it is the single biggest file-size saving you can get from a PNG without losing any sharpness.
Remove the hidden data
PNG files often carry invisible metadata: the name of the software that created them, colour profile information, creation dates, and sometimes even location data from a screenshot tool. None of this is visible in the image, but it all takes up space, and in some cases it can add tens of kilobytes to every file.
Stripping metadata is safe for web images in almost every case. The one exception is the colour profile: removing it can occasionally change how colours look in some browsers, although for screenshots and simple graphics the difference is usually nil. If colour accuracy matters — for a product image, for example — keep the colour profile and strip the rest.
Most compression tools remove metadata automatically, and Pixelkit's tools process files locally in your browser. If you are preparing images for a website, stripping metadata is also a small privacy win: it means you are not publishing the software you used or the date a screenshot was taken.
Screenshots versus photos: different rules
It helps to treat screenshots and photographs as two different jobs, because the best settings are different for each.
For screenshots, the priorities are readable text and clean edges. Keep the resolution high enough that small text stays legible — usually at least 1200 pixels wide for a full-screen capture — and be cautious with quality settings below 80%, because text is the first thing to degrade. If the screenshot has no transparency, try WebP at 85% quality first; it is often the best balance of size and sharpness. If the text must be perfect, stay with PNG and reduce the colours instead.
For photographs saved as PNG by mistake, the fix is simple: convert them. A photo that is 8 MB as a PNG will usually be 1 to 1.5 MB as a JPG at 80% quality, or under 1 MB as WebP, and it will look the same. There is no reason to publish a photograph as a PNG unless it needs transparency — and photographs almost never do.
Common mistakes to avoid
- Publishing a photograph as a PNG. This is the most common waste of bandwidth on the web. Photos belong in JPG or WebP, not PNG.
- Uploading a screenshot at full monitor resolution. A 2560-pixel screenshot displayed at 800 pixels is carrying three times more data than anyone will ever see. Resize first.
- Reducing colours on a photo or gradient. A 256-colour palette turns smooth skies into stripes. Only reduce colours on flat graphics and simple screenshots.
- Compressing an already-compressed copy. If a PNG has already been through a compressor, running it through again will not help much and can introduce artefacts. Always work from the original.
- Forgetting to check the text. Always zoom into the compressed file and read the smallest text in it. If it has gone fuzzy, raise the quality or keep the PNG.
- Keeping transparency when you do not need it. A transparent background makes a PNG larger. If the image will always sit on a white page, flatten it onto white first.
Related guides
Frequently asked questions
How much smaller can a PNG get? It depends on the image. A simple logo or diagram can shrink by 50 to 70% by reducing colours. A screenshot converted to WebP at 85% quality is often 50 to 70% smaller than the original PNG. A photograph converted from PNG to JPG typically shrinks by 70 to 80%. Always compare the file sizes yourself.
Does compressing a PNG reduce its quality? Lossless PNG compression does not change a single pixel — it only stores the same pixels more efficiently. Converting to WebP or JPG is lossy, which means some detail is removed, but at 85% quality the difference is usually invisible, especially for screenshots.
Should I use PNG or WebP for screenshots? Try WebP at 85% quality first: it is usually much smaller and the text stays readable. Use PNG when the text must be pixel-perfect, when you need transparency, or when the image will be opened in software that does not support WebP.
Why is my screenshot still large after compressing? Usually because the dimensions are still large, or because the screenshot contains a photograph or a gradient that does not compress well as a PNG. Resize it to the display size first, and consider converting to WebP if there is no transparency to preserve.