What Is PNG? The Lossless Image Format With Transparency, Explained
A logo on a website, an icon in an app, a screenshot in a chat, a sticker with a see-through background — almost certainly that's a PNG. It's the format that loses not a single pixel when it compresses and can make a background truly transparent. Let's unpack how it works, how PNG-8, PNG-24 and PNG-32 differ, and when PNG is the right choice — and when it isn't.
What PNG is in plain English
PNG (Portable Network Graphics) is a raster image format — a picture made of pixels, like a photograph. But unlike the familiar JPG, PNG has two superpowers: it compresses without losing any quality and it can store transparency. That's why logos, icons, screenshots, UI buttons and any image where crisp edges and text matter all live as PNG.
The key difference from JPG is easiest to see with an example. Save a logo as JPG and faint, muddy fringes appear along the sharp edges of the letters, while the transparent background turns white. Save the same logo as PNG and the edges stay razor-sharp and the background can be made invisible. PNG keeps every pixel exactly as it was.
In short
PNG is a raster format with lossless compression and transparency. It's ideal for drawn graphics: logos, icons, screenshots and text. For photographs, JPG or WebP are usually better — they produce a file many times smaller.
Where PNG came from: a format born from a patent row
PNG has a surprisingly dramatic backstory. In late 1994, Unisys suddenly announced that the LZW compression algorithm at the heart of the wildly popular GIF format was covered by its patent — and using it would now require royalties. To a whole generation of web developers, this came like a bolt from the blue.
The response was immediate. As early as January 4, 1995, programmer Thomas Boutell kicked off a discussion of a free GIF replacement in the Usenet group comp.graphics. An informal internet working group of enthusiasts formed and got to work. Instead of patented LZW, they adopted the open DEFLATE algorithm — and won straight away: tests showed that simply swapping LZW for DEFLATE compressed about 10% better.
In October 1996, version 1.0 of the specification was released and, at the same moment, became a W3C recommendation. The result was a completely free format that not only replaced GIF but outclassed it: it added full color (24-bit, versus GIF's measly 256 colors) and genuine smooth transparency.
Lossless compression: where the magic is
"Lossless compression" sounds like marketing, but the meaning is literal: after a PNG is decompressed you get exactly the same pixels you started with — every single bit. You can open, edit and re-save an image a hundred times in a row and it won't crumble the way a JPG does. How does PNG pull this off? In two steps.
Step 1 — filtering. Before compressing, PNG doesn't store the pixel colors directly; it predicts each pixel from its neighbors (to the left and above) and records only the difference. In an image with a smooth gradient or a flat fill, neighboring pixels are nearly identical, so the difference is close to zero — and long runs of zeros compress beautifully. PNG has five prediction methods to choose from: None, Sub, Up, Average and the clever Paeth, and it picks the best one for each row.
Step 2 — DEFLATE compression. The prepared data is squeezed with DEFLATE — the very same algorithm that powers ZIP archives. Thanks to the filtering, it finds far more repetition than it would in the raw pixels. The result: for the same content, a PNG is typically 10–50% smaller than a GIF, especially for screenshots, logos and simple graphics.
Why photos are heavy as PNG
The very logic that makes PNG a champion on graphics works against photographs. In a photo, neighboring pixels are almost always slightly different (noise, texture, gentle gradients), so prediction works poorly and there's little to compress. That's why a photograph as PNG can weigh 5–10 times more than the same image as JPG, with no visible benefit.
Transparency and the alpha channel
PNG's second superpower is true transparency. GIF's version was crude: a pixel could be either fully visible or fully invisible — no in-between. As a result, the edges of transparent images looked like a jagged staircase.
PNG solves this with an alpha channel. To the usual three color channels (red, green, blue) it adds a fourth — alpha — which stores, for each pixel, how transparent it is: a value from 0 (the pixel is fully transparent) to 255 (fully opaque). And because every value in between is allowed, you get soft shadows, glows, blurred edges and semi-transparent gradients that sit cleanly on any background.
PNG-8, PNG-24 and PNG-32: the difference
"PNG" isn't one format but a family. The number in the name is the bits per pixel, and it governs the color palette, transparency support and file size all at once.
| Type | Colors | Transparency | When to use |
|---|---|---|---|
| PNG-8 | Palette up to 256 | On/off per pixel | Simple icons, small graphics — minimum weight |
| PNG-24 | 16.7M (truecolor) | None | Full-color graphics without a transparent background |
| PNG-32 | 16.7M + alpha | Smooth, per pixel | Logos and images with soft transparency |
PNG-8 stores not the colors themselves but indices into a palette of at most 256 shades — like paint-by-numbers. That makes it very light, but the palette isn't enough for photos and complex gradients. PNG-24 is full color: 8 bits for each of the three channels, 16.7 million colors in total, but with no alpha channel. PNG-32 is that same truecolor plus an 8-bit alpha, i.e. full smooth transparency. It's what people mean when they say "a PNG with a transparent background."
Don't confuse "lossless" with "small"
PNG loses no quality, but that doesn't make it lightweight. A large PNG-32 can be very heavy because of the alpha channel. If you don't need transparency, choose PNG-24 or PNG-8 and the file will be noticeably lighter. And for the web, transparent graphics are often converted to WebP: it supports an alpha channel too, but weighs less.
How a PNG file looks inside
Peek under the hood of a PNG file and you'll find a tidy, almost engineered design. Every PNG begins with an 8-byte signature (137 80 78 71 13 10 26 10). It's the format's fingerprint: from it, a program instantly knows this really is a PNG and not something else.
After that comes a chain of blocks called chunks. Each chunk is a small, self-contained packet of four parts: the data length, a four-letter type (such as IHDR), the data itself, and a CRC checksum to verify integrity. Three chunks are mandatory in any PNG:
- IHDR — always first. It's the picture's "passport": width, height, color depth, type (palette / truecolor / grayscale) and whether there's an alpha channel.
- IDAT — this holds the compressed pixels themselves. There can be several of these in a row.
- IEND — the simplest chunk of all: empty, it just says "the file ends here."
Between them can sit optional (ancillary) chunks: tRNS for palette transparency, gAMA for gamma, tEXt for text notes and others. The neat part: a program that doesn't recognize a chunk simply skips it — the format is extensible by design.
When to choose PNG — and when not to
PNG isn't the "best format overall" — it's a specialist in its field. The simple rule: if the image has sharp edges, text, or needs transparency, reach for PNG. If it's an ordinary photograph, JPG is almost always the better deal.
Logos and icons
Crisp lines and flat colors stay sharp, and the background stays transparent.
Screenshots and text
No artifacts around the letters — text reads perfectly.
Need to shrink a PNG for your site?
If a photo ended up as a PNG and weighs too much, convert it to JPG with the free FormatZ converter — right in your browser, with no install and no sign-up.
Convert PNG to JPGHow to open and convert PNG
Opening a PNG is never a problem: every browser understands it, as do the built-in viewers on Windows and macOS and every graphics editor — from Photoshop and GIMP to the free Paint.NET. Double-click and the image is on screen.
Converting, on the other hand, is often needed — usually to cut down the size. If your PNG turns out to be a photo, convert it to JPG and the size drops dramatically. Want the best of both — light yet transparent — pick WebP. Got an image in another format and want transparency or crispness back? The reverse conversions JPG → PNG or WebP → PNG come in handy. The full list of available conversions is on the all formats page.
A word on converting back
Remember: if a photo was already a JPG, converting it to PNG will not bring back the lost quality — it only "freezes" the image losslessly from here on. PNG preserves what's there; it can't restore what JPG already threw away.
Frequently asked questions about PNG
Read next
ComparisonPNG vs JPG: Which to Choose and Why
When crispness beats size, and when it's the other way around.
GuidePNG Transparency: How the Alpha Channel Works
Soft edges, shadows and a clean transparent background.
How-toHow to Compress PNG Without Losing Quality
Cut file weight while keeping sharpness and transparency.