What is a PNG file?

Lossless, transparent, and excellent at everything JPEG is bad at — which is also exactly why photographs saved as PNG are enormous.

PNG at a glance

Extension
.png
Compression
Lossless. Every pixel value survives exactly.
Transparency
Full 8-bit alpha channel — 256 levels, not just on/off.
Animation
APNG exists but support is inconsistent. Treat PNG as still-only.
Colour depth
Up to 16 bits per channel. PNG-8 uses a 256-colour palette.
Best for
Screenshots, logos, diagrams, line art, anything with transparency.
Worst for
Photographs — routinely 5–10× larger than JPEG for no benefit.
Support
Universal since the late 1990s.

Understanding PNG

How it compresses

PNG works in two stages. First it filters each row of pixels, replacing each value with its difference from a neighbouring pixel — so a smooth gradient becomes a long run of near-identical small numbers. Then it runs DEFLATE, the same algorithm a ZIP archive uses, over the result.

That design explains precisely which images PNG is good at. Flat colour, repeated patterns, sharp edges and text all produce long predictable runs after filtering, and DEFLATE collapses them dramatically.

Photographic noise produces nothing predictable at all, which is why a photograph in PNG is enormous. It is not a failure of the format — it is the format doing exactly what it promises, on content that offers it nothing.

Transparency, done properly

PNG's alpha channel stores 256 levels of opacity per pixel, not a single transparent colour. That means genuinely soft edges: a drop shadow fading to nothing, an anti-aliased logo that sits cleanly on any background colour.

This is the main reason PNG remains indispensable. GIF offers only binary transparency, which produces jagged fringes; JPEG offers none at all.

WebP matches PNG here — full alpha, typically 25–35% smaller — which makes it the better choice for the web specifically.

PNG-8 and the quantisation trap

PNG-24 stores full colour. PNG-8 stores a palette of at most 256 colours, which can be four times smaller.

Reducing an image to 256 colours is a lossy operation, performed before the lossless save. On a logo with six flat colours it is invisible and the saving is real. On a photograph or anything with a gradient it produces visible banding and dithering noise.

This matters when reading tool claims. A "lossless PNG compressor" advertising 70% savings is almost certainly quantising the palette. That may be fine for your image — but it is not lossless, and you should know which you are getting. The PNG tool on this site does not quantise, which is why its numbers are more modest and genuinely reversible.

Why your PNG is so large

Three usual causes, in order of frequency.

It is a photograph. Wrong container. Convert to JPEG or WebP and it will drop by 80–95%.

It is a screenshot from a high-density display. A screenshot of a window 1440 points wide on a 2× screen is really 2880 pixels wide. Halve the dimensions and the file drops by roughly three quarters.

It has a lot of noise or texture. Photographic grain, film effects and heavy gradients all defeat lossless compression. If the content is not flat, PNG cannot help you.

Try it yourself

Everything below runs in your browser, so you can test any of this on your own files without uploading them.

  • Compress PNG

    Lossless by default, with transparency carried through untouched.

    Open the tool
  • PNG to JPG

    For photographs stored in the wrong container. Transparency is flattened deliberately.

    Open the tool
  • Lossless compressor

    Zero quality loss, every pixel preserved exactly. Honest about how modest the saving is.

    Open the tool
  • Resize image

    By pixels or percentage, aspect ratio locked, across a whole batch.

    Open the tool

Questions

Frequently asked questions

Every answer below is present in the page source, expanded, so it can be read without opening anything.

Is PNG better quality than JPEG?

It is lossless, so it preserves the original exactly — but that is not the same as looking better. For a photograph at sensible settings the JPEG is visually identical and a fraction of the size. For a screenshot the PNG genuinely does look better, because JPEG puts haloes around every hard edge.

Why is my PNG bigger than the JPEG?

Because it is lossless and the content is photographic. PNG has to record every pixel exactly, with no ability to discard detail you would never notice. For photographs that is five to ten times the data for no visible benefit.

Does compressing a PNG lose quality?

Not in a genuine lossless re-encode — every pixel value is identical afterwards. It does if the tool quantises the palette to 256 colours, which many do while still calling the result lossless. Check what you are getting.

PNG or WebP for transparency on the web?

WebP. It carries the same full alpha channel and is typically 25–35% smaller for the same image, with support in every current browser. Keep PNG for files that must open in older desktop software.

What is the difference between PNG-8 and PNG-24?

PNG-8 uses a palette of at most 256 colours and can be several times smaller; PNG-24 stores full colour. Converting to PNG-8 is lossy. It is invisible on flat graphics and obvious on gradients and photographs.

Can PNG store animation?

APNG exists and browsers support it, but tooling is patchy and it is rarely the right answer. For animation, use animated WebP — far smaller than GIF and full colour.

From the blog

Related reading

Longer, more practical guides from the blog.

  • Image Formats

    PNG vs JPEG: When to Use Each, With the File Sizes to Prove It

    PNG stored the same photograph in 1274.1 KB where JPEG needed 67.5 KB — nineteen times larger. On a flat graphic PNG won. On a smooth gradient PNG lost to JPEG by a factor of two, which surprises most people.

    9 min read

  • Practical Guides

    How to Strip EXIF Data From Photos, and What Breaks When You Do

    A photograph from a phone can carry the coordinates of the place it was taken, the camera serial number and the exact timestamp. Removing that data is straightforward. Removing it carelessly rotates your photos sideways.

    9 min read

  • Practical Guides

    How to Compress Images for a Website Without Wrecking Them

    Resize before you compress. Measured on one photograph: half the width at quality 80 produced a 16.4 KB file, while full width at quality 40 produced 20.6 KB and looked far worse. The order of operations matters more than the settings.

    8 min read