Transparency is one of the most practical reasons to choose one image format over another. Need a product photo on a transparent background? A logo that works on any page color? A UI component with a drop shadow? You need a format that supports an alpha channel — and not all of them do.
The differences between formats matter more than you'd expect. GIF's binary transparency creates jagged edges. JPEG has no transparency at all. WebP's separate alpha compression produces files 50-70% smaller than PNG for the same transparent image. AVIF pushes this further with HDR-quality alpha.
This guide explains how alpha channels actually work, compares transparency support across every major format, and helps you pick the right one for your use case.
How Alpha Channels Work
An alpha channel is an additional data channel stored alongside red, green, and blue. Each pixel has four values: R, G, B, and A (alpha). The alpha value determines opacity: 0 means fully transparent, 255 means fully opaque, and values between create semi-transparency.
When an image with alpha is placed on a background, the renderer performs alpha compositing: for each pixel, it blends the foreground color with the background color based on the alpha value. The formula is: result = foreground * alpha + background * (1 - alpha). An alpha of 0.5 gives you a 50/50 mix of foreground and background.
This is why transparent images look different on different backgrounds — the blending produces different colors depending on what's behind the image. A red circle at 50% opacity looks bright red on white but dark red on black.
Premultiplied vs Straight Alpha
There are two ways to store alpha data, and mixing them up causes visible errors.
Straight (unassociated) alpha: RGB values store the full color, independent of alpha. A red pixel at 50% opacity stores (255, 0, 0, 128). The color data is 'pure' red regardless of transparency. PNG uses straight alpha.
Premultiplied (associated) alpha: RGB values are pre-multiplied by the alpha value. That same red pixel at 50% opacity stores (128, 0, 0, 128) — the red channel is already halved. Video compositing, game engines, and WebP internally use premultiplied alpha because compositing is faster (one multiplication instead of two per pixel).
If you interpret premultiplied data as straight (or vice versa), you get dark halos around semi-transparent edges or washed-out colors. Most image editors handle the conversion automatically, but it's worth knowing when debugging transparency artifacts.
Transparency Support by Format
| Format | Alpha Type | Bit Depth | Notes |
|---|---|---|---|
| PNG | Full alpha | 8 or 16-bit | The standard. Lossless. Universal support. |
| WebP | Full alpha | 8-bit | Lossy RGB + lossless alpha. Best size/quality ratio. |
| AVIF | Full alpha | 8, 10, or 12-bit | Best compression. HDR alpha. Slower encoding. |
| GIF | Binary only | 1-bit | Fully transparent OR fully opaque. No gradation. |
| JPEG | None | N/A | No transparency support of any kind. |
| SVG | Vector transparency | Continuous | CSS opacity, fill-opacity, stroke-opacity. |
| TIFF | Full alpha | 8 or 16-bit | Supported but rarely used for web. |
| BMP | Limited | 8-bit (32-bit BGRA) | Technically supported; inconsistent software support. |
| ICO | Full alpha | 8-bit | Via embedded PNG or 32-bit BMP. |
| HEIC | Full alpha | 8 or 10-bit | Supported but rarely used for transparent images. |
PNG: The Default for Transparent Images
PNG is the go-to format for transparent images because it combines full alpha support, lossless quality, and universal compatibility. Every browser, every image editor, every platform handles transparent PNGs correctly.
Color types with alpha:
- RGBA (type 6): 32-bit (8 per channel) or 64-bit (16 per channel). Full-color with full alpha. This is what you get when you export a transparent image from Photoshop, Figma, or any design tool.
- Grayscale+Alpha (type 4): 16-bit or 32-bit. For monochrome transparent images (masks, shadows).
- Indexed with tRNS (type 3): The palette can include transparency — each palette entry gets an alpha value. This produces much smaller files for simple graphics with limited colors and transparency.
A 1000x1000 product photo on a transparent background is typically 200-800KB as 32-bit PNG. The same image as indexed PNG (if it has few enough colors) might be 30-80KB. Running pngquant can often convert 32-bit transparent PNGs to 8-bit indexed with transparency, saving 60-80%.
WebP: The Optimized Choice
WebP's killer transparency feature: it compresses the alpha channel separately from the RGB data. In lossy WebP, the RGB is compressed with VP8 (lossy) while the alpha channel is compressed with VP8L (lossless). You get small files and perfectly sharp transparency edges.
This matters because transparency edges are often the most important part of a transparent image. A product cutout with soft edges, a logo with anti-aliased borders, an icon with a subtle drop shadow — any lossy compression on the alpha channel would make these edges look rough. WebP avoids this entirely.
Typical size comparisons for transparent images:
| Image Type | PNG (32-bit) | WebP (lossy RGB, lossless alpha) | Savings |
|---|---|---|---|
| Product photo cutout (1000x1000) | 400 KB | 80 KB | 80% |
| Logo with soft shadow (500x200) | 25 KB | 8 KB | 68% |
| UI button with glass effect (200x60) | 8 KB | 3 KB | 63% |
| Icon with drop shadow (64x64) | 3 KB | 1.5 KB | 50% |
For e-commerce sites with hundreds of product cutouts, switching from PNG to WebP for transparent images can reduce total image bandwidth by 60-80%. Convert PNG to WebP here.
AVIF: Maximum Compression with HDR Alpha
AVIF supports alpha channels at 8, 10, or 12 bits per channel. The alpha plane is compressed alongside the color planes using AV1 coding, and the encoder can allocate bits independently to color and alpha based on content complexity.
AVIF's alpha compression is 20-40% more efficient than WebP's for the same visual quality. A product cutout that's 80KB in WebP might be 50KB in AVIF. The tradeoff is encoding speed — AVIF takes 10-50x longer to encode than WebP.
The 10-bit alpha channel is unique to AVIF among web formats. Standard 8-bit alpha gives 256 opacity levels. 10-bit gives 1,024 levels. The difference is visible in extremely subtle transparency gradients — frosted glass effects, subtle glows, and volumetric lighting. For typical product cutouts and logos, 8-bit alpha (PNG or WebP) is sufficient.
GIF: Binary Transparency (and Its Problems)
GIF supports only binary transparency: each pixel is either fully transparent or fully opaque. There's no semi-transparency, no smooth edges, no gradual fade.
The practical problem: anti-aliased edges. When a designer creates a logo with smooth edges, those edges contain semi-transparent pixels that blend the foreground with the background. In GIF, these pixels must be either fully opaque or fully transparent. The result is jagged stair-step edges (if transparent) or a visible halo of the matting color (if opaque).
The matting problem: to make GIF transparency look acceptable, you matte the semi-transparent pixels against an expected background color (usually white). The logo looks fine on a white background but shows a white halo on any other background. This is why GIFs on dark backgrounds often have ugly light borders around them.
For transparent static images, PNG has been the better choice since 1996. GIF transparency is only relevant for animated GIFs that need transparency — and even then, animated WebP handles it better.
SVG: Vector Transparency
SVG handles transparency at the element level using CSS properties:
opacity: 0.5— makes the entire element (including children) 50% transparentfill-opacity: 0.5— makes just the fill color semi-transparentstroke-opacity: 0.5— makes just the stroke semi-transparentfill: rgba(255, 0, 0, 0.5)— CSS rgba color with alpha
SVG transparency is resolution-independent — a semi-transparent gradient in SVG renders smoothly at any size. Combined with mask elements and clip paths, SVG can create complex transparency effects that would require multi-megabyte PNGs.
For logos and icons that need transparency, SVG is almost always the best choice. A 2KB SVG logo with transparency replaces a 50KB PNG at every resolution.
Choosing the Right Transparent Format
- Product photos on transparent backgrounds: WebP (lossy RGB, lossless alpha) for web. PNG if you need universal compatibility.
- Logos and icons: SVG first. PNG or WebP if raster is needed.
- UI components (buttons, cards, glass effects): CSS for generated effects. WebP or PNG for pre-rendered.
- Animated content with transparency: Animated WebP or APNG. GIF if universal compatibility is required (email).
- Print with transparency: TIFF with alpha, or PNG at 16-bit. PDF with transparency is also common.
- Maximum compression: AVIF with alpha. Best size but slowest encoding.
Transparency support is a hard requirement that immediately narrows your format options. JPEG is out. GIF is limited to binary edges. For real transparency with smooth edges and proper alpha blending, your choices are PNG (universal, lossless), WebP (optimized, lossy RGB with lossless alpha), AVIF (maximum compression, HDR alpha), and SVG (vector).
Convert between transparent formats with ChangeThisFile: PNG to WebP for web optimization, WebP to PNG for compatibility, or SVG to PNG when you need raster output from vector sources. All conversions preserve transparency.