PNG

Compress PNG

Up to 100 files at once. Mixed formats are fine.

Compressing a PNG here is lossless: every pixel comes out exactly as it went in, and the file gets smaller because it is stored more cleverly rather than because anything was thrown away. Drop a file above and it happens in your browser. Expect ten to thirty per cent from a file written by a design tool, and close to nothing from one that has already been optimised — in which case you get the original back.

Lossless here means lossless

PNG stores every pixel exactly, and so does this. What changes is the encoding. Before compressing a row of pixels, PNG may transform it — subtract the pixel to the left, or the one above, or an average of both — and a well-chosen transform turns a smooth gradient into a long run of near-identical numbers that the compressor then flattens to almost nothing.

Most software picks one of those transforms quickly and moves on. oxipng, which is what runs here, tries the combinations properly and keeps whichever produced the fewest bytes. The image is bit-for-bit identical; only the description of it is shorter. That is the entire trick, and it is why "compress PNG" and "compress JPG" are genuinely different operations rather than the same one at different strengths.

Why your PNG is larger than you expected

Usually because it is a photograph. PNG was designed for images with flat areas and hard edges — logos, screenshots, diagrams, text — and it is excellent at those. A photograph has no flat areas at all: every pixel differs slightly from its neighbours, there are no runs to compress, and PNG dutifully stores all of it. The same picture as a JPEG is routinely a tenth of the size.

If that is your situation, no lossless compressor will rescue it, and the honest answer is a different format. Converting to JPEG or WebP will do more in one step than any amount of PNG optimisation. If the image needs a transparent background, WebP keeps it and JPEG does not.

Resizing works here too, and works better

A screenshot taken on a high-density display is twice the dimensions it appears to be. A 2× screenshot pasted into a document that shows it at half size is carrying four times the pixels anyone will see, and dropping the width to what is actually displayed saves far more than lossless optimisation ever can.

The one thing to watch is text. A screenshot containing readable words should be resized cautiously or not at all — the letterforms are exactly the fine detail that scaling destroys, and a document with unreadable screenshots is worse than a large one.

When nothing can be saved

PNGs exported by image optimisation tools, or by software that already runs a good encoder, are frequently at or near their smallest. Running another pass over them finds nothing, and a compressor that returns a marginally different file of the same size has wasted your time.

When that happens the original comes back unchanged. It is not a failure — it is the correct answer, and it means whoever produced the file already did this. The "thorough" setting searches longer and occasionally finds a few per cent more; it is worth one attempt and rarely worth a second.

How to compress a PNG

  1. Drop your PNG onto this page, or click to choose one.
  2. oxipng searches for a smaller encoding of exactly the same pixels, in your browser.
  3. Check the saving. If nothing could be saved, the file comes back as it was.

Compressing PNG: common questions

Does this reduce the quality?
No, not at all. The compression is lossless: the pixels that come out are the pixels that went in, exactly, and you could compare them byte by byte after decoding. All that changes is how compactly those pixels are described inside the file.
Is my image uploaded?
No. oxipng runs as WebAssembly inside your browser, so the file stays on your device. That matters more here than it looks — screenshots are the most commonly compressed PNGs, and they routinely contain things nobody meant to publish.
Why did I only save two per cent?
Because the file was already well encoded, or because it is a photograph. PNG optimisation finds a better description of the same pixels, and if the existing description is already good there is nothing to find. For a photograph, converting to JPEG or WebP will achieve in one step what no amount of PNG compression can.
Should I use PNG or WebP?
WebP is smaller for almost everything, keeps transparency, and every browser has supported it for years. PNG is still the safer choice when the file has to open in older or unusual software — print workflows, some office applications, embedded systems. If nothing downstream demands PNG, converting is the bigger win.
Does the transparency survive?
Yes, exactly. The alpha channel is part of the image and lossless means lossless. There is an option to optimise the alpha channel, which is on: it rewrites fully transparent pixels to a uniform colour, which cannot be seen — they are invisible — and compresses far better.

Sometimes the better answer is a different format — especially for a photograph stored as PNG.