The PNG format
PNG exists because of a patent. When Unisys began enforcing its claim on the LZW compression inside GIF at the end of 1994, a group of developers on a mailing list specified a free replacement within weeks — lossless, patent-clear, and with the proper alpha channel GIF never had. It shipped in 1996 and has been the safe answer ever since, as long as what you are handing it is not a photograph.
PNG at a glance
- Introduced
- 1996 · W3C
- File extensions
- .png
- MIME type
- image/png
- Compression
- Lossless
- Transparency
- Yes, with soft edges
- Animation
- No
- Colour depth
- 8 bits per channel
- Wide gamut
- sRGB only
- High dynamic range
- No
- Maximum dimension
- No practical limit
- Support
- Everywhere, without exception
Lean Image reads PNG and writes it.
Where it came from
For its first seven years GIF was simply what images on the internet were. Then, at the very end of 1994, Unisys announced it would enforce its patent on the LZW algorithm that GIF used to compress, and developers who had been shipping GIF encoders for free discovered they were expected to pay.
The response was unusually quick. A specification for a replacement was drafted over a matter of weeks on a mailing list, went through several public revisions during 1995, and became a W3C Recommendation in 1996. The design brief was explicit: patent-free compression, exact reproduction of the original pixels, more than 256 colours, and a real alpha channel. The recursive joke in the name — PNG’s Not GIF — tells you how deliberate the whole thing was.
How it compresses
Two stages: a per-scanline filter, then DEFLATE, the same algorithm inside a zip file. The filter is the interesting half. Each row is stored as the difference between its pixels and a prediction made from the pixel to the left, the row above, or a blend of the two, and the encoder picks whichever prediction makes that row’s differences smallest.
On a flat panel of interface grey, all those differences are zero, and zeros compress to essentially nothing. On a photograph the differences are sensor noise, and noise does not compress at all. That one sentence explains almost everything PNG does, in both directions.
What it is good at, and what it is not
It is excellent at screenshots, interface captures, logos, diagrams, charts, line art, pixel art and text on a flat background — anything built from hard edges and regions of identical colour. Its alpha channel gives 256 levels of transparency per pixel, so an antialiased edge composites cleanly onto any background rather than fringing.
It is bad at photographs, and not marginally so. A photograph saved as PNG is commonly five to ten times the size of a JPEG nobody could tell apart from it. Two things account for most slow web pages: a photograph shipped as a PNG, and a photograph shipped four times wider than it is displayed.
Making a PNG smaller, honestly
There are three levers, and this tool has one of them.
Fewer pixels. Halving the width and height quarters the pixel count, and on a lossless format that is the only thing that reliably moves the file size. It is why the quality slider is disabled whenever PNG is the output: there is no quality dial in a lossless encoder to turn.
Fewer colours. Quantising an image down to a 256-entry palette often takes well over half the file away and is invisible on flat graphics. This tool does not do it — there is no palette-reduction step in the pipeline, and claiming otherwise would be the wrong kind of claim to make. pngquant and the many front-ends built on it do exactly this, and for a logo or a diagram that is the tool to reach for.
A different format. WebP and AVIF both compress this material harder than PNG at the same apparent quality, and both keep the transparency.
What to convert it to
WebP for the web. It is the general-purpose answer: much smaller than PNG, keeps the alpha channel, and works in every current browser. Note that what a browser canvas writes is the lossy mode, so it is a re-encode rather than an exact copy.
JPG when the image is photographic and nothing about it needs transparency. Expect a large saving and a flat background wherever the transparency was.
AVIF for the smallest file of all, at the cost of a slower conversion.
Keep the PNG when the pixels have to be exact: source art you will edit again, anything going back into a design tool, or an image whose transparency has to survive untouched.
Convert a PNG into something else
- PNG to JPGThe lossy photo format every device on earth can open, essentially unchanged since 1992.
- PNG to WebPGoogle’s replacement for both JPEG and PNG — smaller than either, and supported by every current browser.
- PNG to AVIFThe smallest files of anything here at a given quality, at the cost of the slowest encode and the newest support.
Convert something else into PNG
- JPG to PNGThe lossy photo format every device on earth can open, essentially unchanged since 1992.
- WebP to PNGGoogle’s replacement for both JPEG and PNG — smaller than either, and supported by every current browser.
- AVIF to PNGThe smallest files of anything here at a given quality, at the cost of the slowest encode and the newest support.
- GIF to PNGCapped at 256 colours per frame, which is why it is wrong for photographs and right for almost nothing else in 2026.
- SVG to PNGNot an image but a drawing instruction — resolution-independent, and the only format here you can open in a text editor.
- HEIC to PNGApple’s default camera format since iOS 11 — around half the size of JPEG, and unreadable on a stock Windows install.
Make one smaller
Questions about PNG
Why is my PNG so much larger than a JPEG?
Because it is lossless and your image is probably a photograph. PNG stores every pixel exactly, and photographic noise gives its compressor almost nothing to work with. The same picture as a JPEG is routinely five to ten times smaller and indistinguishable at normal viewing size.
How do I make a PNG smaller without changing the format?
Here, by reducing its dimensions — there is no palette-reduction step in this tool, so pixel count is the only lever on a PNG. Dedicated tools such as pngquant cut the number of colours instead, which is where the dramatic savings on flat graphics come from.
Does PNG support animation?
Plain PNG does not, which is what the table above means. APNG is a later extension that reuses the same file extension, is supported by browsers and by rather little else, and is best treated as a separate format. This tool reads and writes still PNGs.
Is PNG still lossless if I resize it?
The format is lossless; resizing is not. PNG guarantees that whatever pixels you hand the encoder come back exactly, and changing the dimensions changes which pixels those are. Nothing is lost to compression, but pixels are still discarded.
PNG or JPG for a screenshot?
PNG, in almost every case. A screenshot is flat colour, hard edges and text — exactly what PNG compresses well, and exactly what JPEG turns into a fuzzy halo around the letters. The exception is a screenshot that is mostly a photograph.
Work with a PNG file
Drop one in and see what comes out, without uploading anything.