Format reference · .png

What is a PNG file?

PNG (Portable Network Graphics) is a lossless image format. Every pixel is stored exactly, and it supports full transparency, which makes it the standard choice for screenshots, logos, interface graphics and any image with sharp edges or text.

Why PNG was created

PNG was designed in 1995 as a free replacement for GIF, after the patent holder of GIF’s LZW compression began asking software makers for royalties. It became a W3C Recommendation in 1996 and later an ISO standard. The designers fixed GIF’s biggest limits at the same time: PNG allows millions of colors instead of 256, and smooth partial transparency instead of on/off pixels.

The specification was revised again in 2025. That third edition formally added animated PNG (APNG) and signaling for HDR and wide-gamut color, features that browsers had already started to use.

How PNG compression works

PNG compression has two stages, and neither discards data. First, each row of pixels is passed through a filter that predicts each byte from its neighbors to the left, above or diagonally, and stores only the difference. Flat areas and smooth gradients turn into long runs of zeros. Second, the filtered data is compressed with DEFLATE, the same algorithm used in ZIP files.

Because it is lossless, the file size depends on how predictable the image is, not on a quality setting. A screenshot with large flat areas compresses extremely well. A photo, full of sensor noise and fine texture, barely compresses at all. Decoding a PNG always gives back the exact pixels that went in.

  • Palette images (often called PNG-8): up to 256 colors, very compact
  • Grayscale, with or without alpha
  • Truecolor RGB (PNG-24) or RGBA with alpha (PNG-32)
  • 8 or 16 bits per channel

Transparency and animation

PNG’s alpha channel gives every pixel one of 256 opacity levels (or 65,536 at 16 bits). That is what makes soft shadows and anti-aliased logo edges look clean on any background. Palette PNGs can also carry per-color transparency, so even small 256-color files can have smooth edges.

APNG adds frames and timing on top of a regular PNG. Programs that don’t understand it simply show the first frame. All major browsers play APNG, though few editors create it, and for long animations it is usually larger than animated WebP.

Support and file size

PNG works everywhere: every browser, operating system, office suite and design tool reads it, and both Windows and macOS save screenshots as PNG by default. It is RGB only, so print workflows that need CMYK use TIFF or PDF instead.

Expect a photo saved as PNG to be several times larger than a good JPG of the same picture. For graphics the picture flips: a PNG of a chart or user interface is often smaller than a JPG and stays perfectly sharp. When a PNG is still too big, Compress PNG reduces it to a palette of up to 256 colors, which typically saves 50–80% on screenshots and graphics. If you need the pixels untouched, Optimize PNG recompresses losslessly instead.

Use PNG for

  • Screenshots, interface mockups and anything with text
  • Logos, icons and graphics that need a transparent background
  • Master copies you will edit and re-save without quality loss
  • Diagrams, charts and pixel art with flat colors

Avoid PNG for

  • Photos for the web, where files get very large
  • Email attachments and upload forms with tight size limits
  • Print jobs that require CMYK color

PNG questions

Is PNG better quality than JPG?

PNG is lossless, so it never adds compression artifacts, while JPG always discards some detail. For photos the difference is usually invisible at a good JPG quality, and the PNG costs far more space. For text, sharp lines and logos, PNG looks clearly cleaner and is often smaller too.

Why is my PNG file so large?

Most often because it contains a photo or a photo-like background. Lossless compression can’t shrink the noise and texture in photographs much. Converting photos to JPG or WebP usually fixes it. For graphics, reducing the color palette to 256 colors or fewer can cut the size by more than half.

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

These are informal names, not separate formats. PNG-8 uses a palette of up to 256 colors. PNG-24 stores full RGB color. PNG-32 is RGB plus an 8-bit alpha channel for transparency. All three are regular .png files that any viewer opens.

Can a PNG be animated?

Yes, through APNG, an extension that adds frames to a normal PNG and is now part of the official specification. All major browsers play APNG. Software that doesn’t support it shows only the first frame, so the file still works as a still image.

Does PNG store EXIF data like camera information?

It can. PNG has text chunks and an EXIF chunk, and some phones and editors fill them in, but many PNGs, such as screenshots, carry little or no metadata. You can check what a file contains with the metadata viewer.

Tools for PNG files

Other formats