Guide

PNG Transparency: How the Alpha Channel Works (and How to Get It Right)

You cut out a logo, saved it as PNG — and on your website a white box suddenly appeared around it, or a thin dark rim. Sound familiar? So it never happens again, let's unpack what actually makes a PNG transparent, why editors show a checkerboard, and how to get a perfectly clean transparent background with no nasty surprises.

Designers editing images on a computer — working with a transparent PNG background
A transparent background is everyday work for a designer. And almost always, the PNG alpha channel is behind it. Photo: Pexels

What the alpha channel is in plain English

Every color image on screen is built from three channels: red, green and blue (RGB). Mixing them in different proportions lets a monitor show millions of shades. But those three channels only describe color — they say nothing about whether a pixel should be visible at all.

Visibility is the job of the alpha channel — a fourth channel that PNG adds to RGB (which is why a full-color PNG is called RGBA). For each pixel, alpha stores a single number — its opacity:

  • 0 — the pixel is fully transparent, as if it weren't there;
  • 255 — the pixel is fully opaque, a normal color;
  • anything in between — partial transparency: the lower the number, the more the background shows through.

The easiest way to picture the alpha channel is as a separate black-and-white image laid over the color one: white means "keep as is", black means "erase to transparent", grey means "make semi-transparent". Those 256 levels are exactly what let PNG draw soft anti-aliased edges, drop shadows and frosted-glass effects — things a plain fill could never do.

In short

RGB tells you what color a pixel is. The alpha channel tells you how visible it is. PNG transparency simply is the alpha channel — there's nothing magical about it.

Why the checkerboard is transparency

Open a transparent PNG in Photoshop, GIMP, Figma or any online editor, and you'll see grey-and-white squares beneath the image. It throws beginners off: "where did this grid come from and how do I get rid of it?"

Relax: it isn't in the file. A monitor physically cannot display "nothing" — it has to paint every dot some color. So editors agreed to draw a neutral checker texture wherever pixels are transparent: that way you can instantly see where the image has pixels and where it has holes. It's purely a visual cue, the same kind of helper as rulers or guides.

Put that PNG on a website, into a slide deck or onto a colored background, and there will be no checkerboard — through the transparent areas you'll see whatever lies behind the image: the page background, a photo, another layer.

The checkerboard isn't part of the picture — it's how editors draw "nothing." In the finished layout, your background takes its place.
A design team reviewing layouts with color samples on the desk
A logo on one background, then another, then a dark theme — a transparent background saves a designer hours. Photo: Pexels

PNG-8 vs PNG-32: jagged edges or smooth

PNG can store transparency in two very different ways, and the choice directly decides whether your object's edges look smooth or look like a staircase.

PNG-8 (indexed) holds at most 256 colors in a palette, and its transparency is usually 1-bit: a pixel can be either fully visible or fully transparent. No in-between. For sharp geometric icons without anti-aliasing that's enough, but on any diagonal or curve the edge turns into a staircase (aliasing): there's simply nowhere to store the smoothing semi-transparent pixels.

PNG-24/32 is a full-color image with a true 8-bit alpha channel: 256 levels of opacity per pixel. (PNG-24 is RGB without alpha; the moment you add an alpha channel, each pixel takes 32 bits — hence the name PNG-32.) This is what gives you smooth anti-aliased edges, soft shadows and clean partial transparency.

PropertyPNG-8PNG-32
Colorsup to 256 (palette)millions (true color)
Transparency1-bit (on/off)8-bit (256 levels)
Edgesjagged, staircasedsmooth, anti-aliased
Semi-transparency & shadowsnoyes
File sizesmallerlarger
Best forflat icons, simple graphicslogos, cut-out photos, UI

Rule of thumb

Got rounded or diagonal edges, a shadow, any semi-transparency? Use PNG-32. Is it a flat two-color icon with straight edges and you need the smallest file? PNG-8 is fine — but check the edge for anti-aliasing first.

How to make a transparent background in PNG

The golden rule: remove the background first, then save as PNG. Saving as PNG does not make a background transparent on its own — it only preserves the transparency you created in the editor. If the background was white, it stays white in the PNG.

1

Separate the subject

Cut out what you need with a mask, or remove the background with an automatic tool. The goal is a checkerboard (transparent) zone around the subject, not a solid color.

2

Clean the edges

Contract the mask slightly or run an "edge decontaminate" so no rim of the old background survives. This step is what prevents future fringing.

3

Export as PNG-32

On export choose a PNG that keeps the alpha channel (PNG-24/32), not PNG-8 — otherwise you lose the soft edge pixels.

4

Test on different backgrounds

Drop the result onto black and onto white. If a halo appears on either one, go back to step 2.

If your source is in a format without transparency (a JPG, say), you have to cut the background out by hand first: conversion alone won't invent transparency. But converting to PNG does create a container that can actually hold that transparency.

Dark halos, lost alpha and other woes

Most transparency problems come down to two things: what color is stored under the transparent pixels, and whether the software can handle alpha at all.

Fringing and a dark/light halo around the edges

The most common complaint is a thin dark (or white) rim around a cut-out object. It comes from the partly transparent edge pixels. Their color is a blend of the subject and whatever background it was cut from or composited against (that color is called the matte). Cut an object out of a white background, then place it on a dark one, and a light halo shows along the edge — and vice versa.

This is also where premultiplied alpha confusion lives. Premultiplied is a way of storing color already multiplied by its opacity. If one program saved the image as premultiplied and another reads it as straight (un-multiplied) alpha, you get that telltale dark halo around the edges. The fix: mask carefully, decontaminate the edge, and where you have the choice, export with straight alpha or set the matte to match the future background.

The big trap: JPG destroys transparency

JPG physically cannot store an alpha channel. Save a transparent PNG as JPG and every invisible area is flooded with a solid color — most often white or black. There's no getting that transparency back out of the JPG. Need transparency? Stay in PNG or WebP. And if you already have the JPG, converting JPG → PNG gives you a container for alpha again, but you'll have to redo the background cut-out yourself.

Alpha "fell off" during conversion

Sometimes transparency is lost not because of JPG, but because of a careless export: the image was accidentally saved as PNG-8 with 1-bit alpha, or the editor flattened the layers onto a white background. The tell-tale sign is a hard staircase instead of soft edges, or a sudden white box. The fix is simple: re-save from the source as PNG-32 without flattening the transparent layer.

Paint tubes and brushes fanned out over a color wheel of swatches
The color of edge pixels is like paint with the background mixed in. Mix in the wrong one and you get a halo. Photo: Pexels

How to check and convert transparency

Before you hand a PNG off, it pays to confirm the transparency is real and clean. It takes about a minute.

1

View it on two backgrounds

Open the PNG in an editor and switch the backing from white to black. A rim or halo visible on either one is an edge defect.

2

Check the alpha type

In file info or on export, look at the depth: RGBA / 32-bit is full alpha; indexed 8-bit is most likely 1-bit transparency with jagged edges.

3

Convert while keeping alpha

If you need to change format, pick one that stores transparency. WebP and PNG can; JPG can't.

When you need to change format without losing transparency, online converters make it easy: WebP → PNG carries the alpha channel from the modern web format into universal PNG, and JPG → PNG prepares a container you can then add transparency to. The full list of conversions is always on the all formats page.

Need to change format and keep transparency?

FormatZ converters run right in your browser: they carry the alpha channel between PNG and WebP and prepare PNGs from JPG — no install, no sign-up, no watermarks.

Convert while keeping transparency

Where transparency is non-negotiable

The PNG alpha channel is an invisible but ubiquitous tool. Here's where it makes or breaks the result:

  • Logos. One transparent PNG drops onto a white business card, a dark website, or over a photo — with no white box around it.
  • Stickers, decals and emoji. An arbitrary shape with a smooth edge exists only thanks to the alpha channel.
  • User interfaces (UI). Icons, buttons, shadows and rounded corners in apps all rest on PNG semi-transparency.
  • Collages and overlays. Cut-out subjects, watermarks, frames — anything meant to sit on top of another image.

The logic is simple: the moment an image needs to sit on top of something you can't predict in advance, it needs transparency — and that means PNG (or WebP) with an honest alpha channel.

Artist's palettes with brushstrokes of paint in many colors
The alpha channel is like a painter's palette: 256 levels of "transparency" instead of a single visible/invisible switch. Photo: Pexels
256opacity levels in PNG-32
1-bittransparency in PNG-8
0alpha channels in JPG

You can boil it all down to one line: PNG keeps transparency, JPG doesn't. The rest is detail — the alpha type and edge cleanliness, both of which you now know how to handle.

The alpha channel is a fourth channel alongside red, green and blue. For every pixel it stores one number — how opaque the pixel is: 0 means fully transparent (invisible), 255 means fully opaque, and values in between give partial transparency. The alpha channel is exactly what lets PNG render soft edges, drop shadows and glass-like effects.
The grey-and-white checkerboard is not part of the image — it is a visual convention for transparent pixels. A screen cannot display "nothing", so editors paint a neutral checker pattern wherever a pixel is missing. The PNG file itself contains no checkerboard: on a website or in a layout, whatever sits behind the image shows through instead.
PNG-8 (indexed) usually stores 1-bit transparency: a pixel is either fully visible or fully gone, with no in-between, which leaves jagged, stair-stepped edges. PNG-32 carries a full 8-bit alpha channel — 256 levels of opacity per pixel — so edges stay smooth and shadows and semi-transparent areas look natural.
That is fringing (a halo): the partly transparent pixels along the edge still contain a trace of the old background or matte color. The usual causes are a premultiplied-vs-straight alpha mismatch, or cutting an object out of a light/dark background without cleaning the edge. The fix is to mask carefully, decontaminate the edge, and if needed set the matte to match the new background.
No. JPG physically cannot store an alpha channel, so converting fills transparent areas with a solid color — usually white or black. If you need transparency, stay in PNG or WebP. To switch formats without losing alpha, use FormatZ converters such as JPG → PNG or WebP → PNG.