Lean Image
Open menu

Compress PNG images

Most PNG compressors get their headline numbers by quietly reducing your image to 256 colours and still calling the result a PNG. This one does not do that, which means the only thing here that moves the file size is how many pixels there are — and, more often than anyone admits, whether a PNG was the right format for this picture in the first place.

Loading the optimizer…

Nothing is uploaded. Every image stays in this browser tab —here is how that works.

What this page does not do

There is no palette reduction here, and no lossy PNG mode. Your PNG goes in, the pixels come out unchanged, and the file that lands in your downloads folder is the same picture rather than a cheaper approximation of it.

That is worth stating plainly because it is not what most PNG compressors do. The large percentages elsewhere generally come from quantisation — mapping every colour in the image onto a palette of 256 or fewer, then storing an index per pixel instead of three or four bytes. It is a genuinely good technique for flat artwork and it is also, unambiguously, lossy. A file that has been through it is a PNG in name and in extension, and a different image from the one you started with.

We would rather have the smaller claim and the honest file. If you want quantisation, tools that do it well exist and you should use one knowingly.

Why some PNGs shrink and others refuse to

PNG compression is looking for repetition — the same pixel value again, a row that resembles the row above it, a run of identical bytes after the filter step. How much of that your image contains decides everything.

A screenshot of an application window is mostly flat fills, straight edges and repeated type. There is an enormous amount of repetition in it, which is why it compresses well and why PNG is the right format for it in the first place. A photograph is the opposite: noise from the sensor means almost no two adjacent pixels match, so the encoder finds nothing to collapse and stores something close to the raw pixel grid. That is why a 12-megapixel photo saved as a PNG can be 20 MB while a full-screen grab is under one.

Both of those are already as small as lossless will make them. Which is why, for one of the two, the answer is not to compress harder.

When the format is the problem

If the picture is a photograph, PNG is costing you roughly ten times what the image needs, and no setting on this page will fix that — the fix is a different format.

  • PNG to JPG if it is going to somebody whose software you cannot see.
  • PNG to WebP if it is going on a website.
  • PNG to AVIF if it is going on a website and you want the smallest file available.

The trade is a lossy pass, and on a photograph at a sensible quality that is not a meaningful loss — it is the trade every photo you have ever been shown on the web has already made.

Keep the PNG if it is your only copy of the image. Hand out the smaller one.

Choosing a width you can defend

Since dimensions are the only lever, it is worth spending thirty seconds on the number rather than leaving the original.

Work backwards from where the image will be seen. A blog body image displayed at 800 CSS pixels wants about 1,600 actual pixels. A full-bleed header on a wide screen wants around 2,400. A screenshot in internal documentation almost never needs more than the width of the column it sits in, doubled. Anything beyond that is bytes every visitor downloads and no screen ever renders.

The one case for keeping the full size is an image somebody will zoom into — a map, a diagram, a detailed product shot. For those, the resolution is the point, and PNG at full width is the correct answer even at 8 MB.

What changes when you compress a PNG

  • PNG is lossless from here on — Benefit

    Whatever the image looks like going in is exactly what comes out, pixel for pixel, and it will stay that way through any number of further PNG saves. That makes it the right target for a master copy, a screenshot, or anything with text and hard edges — and the wrong one for a photograph you want to be small.

  • Your PNG is pixel-exact, so this is the first loss it has seen — Note

    PNG stores every pixel exactly as it was written, which means the file you are starting from is the best version that has ever existed. Anything lossy you convert it to is a one-way step — keep the PNG if it is a master copy and treat the output as a distribution format.

  • The quality slider does nothing here — size comes from dimensions — Note

    A lossless target has no quality dial to turn, so the slider is disabled and the only lever that moves the file size is how many pixels there are. Halving the width and height quarters the pixel count, which is almost always a bigger saving than any encoder setting would have been. Set a max width you actually need rather than shipping the original dimensions.

  • Camera and location metadata are not carried over — Note

    EXIF is dropped: the camera model, the exposure settings, the timestamp, and — the one that matters — the GPS coordinates of where the photo was taken. That is a privacy improvement for anything you are about to publish and a loss if you were relying on it for cataloguing. Orientation is the exception: it is applied to the pixels, so the image stays the right way up.

  • Output is sRGB — Note

    Everything this tool writes is in sRGB, the colour space the web assumes. That is what makes the result look the same in a browser, a chat app and a photo viewer without an embedded profile to carry around.

Questions people ask about compressing PNG

Why is the quality slider greyed out?

Because PNG has no quality setting to change. It is a lossless format: the encoder has to reproduce every pixel exactly, so there is no trade available between detail and size. The slider is disabled rather than quietly ignored, so the panel cannot suggest it is doing something it is not.

Why do other tools make my PNG much smaller than this?

Almost always by reducing the colour palette. A tool advertising 60 or 70 percent off a PNG is usually quantising it to 256 colours or fewer, which is a lossy step wearing a lossless format’s file extension. On a flat graphic the result often looks fine. On a photograph or a soft gradient it bands, and you cannot get the colours back.

Should my photograph be a PNG at all?

Almost certainly not. PNG compression works by finding repetition, and a photograph has essentially none — every pixel differs slightly from its neighbour, so there is nothing to fold up. The same picture as a JPG or a WebP is routinely a tenth of the size and indistinguishable at normal viewing size.

Why did my PNG come back the same size or bigger?

Because it was already well compressed and you asked for no dimension change. The encoder here is the browser’s, which is competent and general-purpose; a file that has been through a dedicated PNG optimiser can come back slightly larger from it. The pixels are identical either way. If the size did not move, the answer is a max width rather than another pass.

What width should I set?

Roughly twice the size the image will actually be displayed at, so it stays sharp on a high-density screen and no sharper than that. A screenshot taken on a Retina Mac is already at 2× — a 3,000-pixel-wide grab of a 1,500-point window needs nothing more, and usually less if it is going into a document rather than onto a web page.

Related

Other things you can turn a PNG into

Try it with your own file

Drop an image in and see the result before you download anything.