Format · PNG

Lossless is a guarantee,
not a size

PNG stores pixels exactly. That makes it the correct format for screenshots, UI and anything with transparency — and a poor choice for photographs, where exactness is the expensive part.

Lossless · Deflate · Alpha · No quality dial
0 pixels changed8 bit palette1 alpha channel
Inside

Predict, then deflate

PNG has no transform and no quantisation. It has a prediction step, a filter choice per row, and general-purpose compression on the result.

Reference

Where the savings come from

PNG is a container for exactly-compressed pixel data. Nothing is approximated, so every byte it saves comes from removing statistical redundancy.

Each row of pixels is first passed through a filter, chosen per row: none, subtract the pixel to the left, subtract the pixel above, subtract their average, or use a Paeth predictor. The filter output — mostly small differences near zero — is then compressed with deflate, the same algorithm as a zip file. That two-stage design is why a screenshot of flat UI compresses well and a photograph does not: prediction makes smooth areas nearly free, while textured photographic detail stays high-entropy.

Why a PNG can still be huge

A 4000×3000 photograph stored as PNG is typically 10–20 MB. The format is doing its job perfectly; the content simply has too much entropy for a general-purpose compressor. This is not a PNG defect, and no PNG optimiser will rescue it — the fix is a format with a quality dial.

Deflate-level and filter-strategy tuning can shave 5–20% off an existing PNG without touching a pixel. That is what lossless PNG compressors actually do, and it is the honest scope of the "compress PNG" promise.

Modes

Palette beats truecolour when it fits

PNG supports several pixel layouts, and the cheapest one is often overlooked.

ModeBits per pixelUse
Palette (indexed)1, 2, 4 or 8Flat UI, icons, logos under 256 colours
Grayscale8 or 16Scans, masks, print separations
Truecolour24Photographs with no transparency
Truecolour + alpha32Anything with a soft edge on a background

Quantising a flat-colour screenshot to a 64-colour palette is often invisible and cuts the file by more than half — but it is a lossy step, so decide it deliberately.

Pipeline

What a PNG optimiser may change

Lossless optimisation has a narrow, well-defined scope. Anything outside it changes pixels.

01 01
Re-filter each row

Choosing a better filter per row can shrink the deflate stream with no pixel change.

02 02
Tighten the deflate stream

Different strategy and level settings produce smaller output for identical data.

03 03
Drop metadata

Comments, EXIF and colour profiles are optional chunks. Removing them is lossless by definition.

04 04
Re-encode the alpha

Some encoders can store alpha with better prediction while keeping every value identical.

05 05
Stop there

Palette reduction and 16→8-bit conversion are lossy. They belong in a separate, explicit decision.

Suits

Where PNG is the right answer

PNG wins whenever exactness or alpha matters more than bytes.

Screenshots Text and window chrome survive exactly; JPEG would fuzz every glyph.
UI assets Icons, borders and states need hard edges and transparency.
Masters A PNG preserved from a design tool is a legitimate archive format.
Anything re-edited later No generation loss between editing sessions.
Limits

When PNG stops paying

Four situations where the lossless guarantee costs more than it is worth.

Photographs

Continuous-tone images stored losslessly are two to four times larger than a good JPEG. Use JPEG or convert.

Web delivery of graphics

Lossless WebP encodes the same pixels in substantially fewer bytes — PNG to WebP covers the choice.

Screenshots with photographic content

A window showing a photo inherits the photo's entropy. Split the decision per region if it matters.

Anything needing animation

Base PNG has no animated form. APNG exists but support is uneven; WebP or video is usually the answer.

Compare

PNG against the alternatives

PNG's role is exactness. Every other format either trades pixels for bytes or drops a capability.

Image formats compared is the full matrix. Lossy vs lossless explains what "exact" is worth, and compress PNG is the tool page for shrinking one without touching a pixel.

FAQ

PNG — FAQ

01
Does saving a JPEG as PNG restore quality?

No. It preserves the damage the JPEG already did. Converting back to a lossy format later adds another generation.

02
Is compressing a PNG lossless?

It can be, and usually is. Lossless PNG compression changes the encoding, not the pixels. Reducing the palette or bit depth is a separate, lossy option.

03
Why is my screenshot 8 MB?

Photographic content inside the window. A screenshot of text is tiny; a screenshot of a photo gallery is not.

04
Does PNG support transparency properly?

Yes — a full 8-bit alpha channel, including soft edges, which is why it is still the default for cut-outs that must be exact.

05
Should I use PNG or WebP for UI assets?

WebP for delivery if decode support is fine; PNG for masters, design handoff, and anything that will be re-edited.

Shrink PNGs without touching a pixel.
Lossless re-encoding, metadata control and alpha preserved — batched over a folder.