Key takeaways
- PNG, WebP, AVIF, SVG, and some TIFF variants support transparency. WebP can retain alpha with lossy or lossless color; ordinary JPEG has no alpha channel.
- A 'white background' you see is usually the viewer compositing your transparent image against white — place it on a dark surface to test before re-editing the file.
- White halos on dark backgrounds come from light edge pixels blended into the alpha; fix them with defringing, or by re-exporting against the intended background colour.
- Transparency costs file size: a soft-edged photographic cutout as lossless PNG can be several times heavier than the opaque equivalent, and the alpha channel is why.
- A background remover can create genuine transparency from scratch; converting a JPG to PNG cannot — the original never contained alpha data.
How Image Transparency Works
Transparency in raster images is stored as an alpha channel: a fourth value per pixel (alongside Red, Green, Blue) representing opacity from 0 (fully invisible) to 255 (fully opaque). A pixel with RGBA values (255, 0, 0, 128) is a 50% transparent red.
Not all formats support alpha: JPEG has no concept of transparency at all. BMP technically can, but almost no software writes it. GIF supports only binary transparency (one palette colour is 'the transparent one' — a pixel is either fully visible or fully invisible, no smooth edges).
Raster formats supporting smooth alpha include RGBA PNG, WebP with lossy or lossless color, AVIF, and suitable TIFF and TGA variants. SVG supports opacity in its drawing model. For everyday web exports, PNG and WebP are practical options; confirm the destination preserves their transparency.
Why Your PNG Shows a White Background
If your 'transparent' PNG shows a white box behind it, one of three things happened: (1) the image was exported without an alpha channel (PNG-24 instead of PNG-32); (2) the transparency was flattened to white during a save or conversion step; (3) the viewer or application you are looking in composites transparent pixels against white by default.
This third point is the most common confusion. Windows File Explorer previews, many image thumbnails, and PowerPoint's default slide background are all white — so a transparent PNG *appears* to have a white background even though the alpha data is correct. Try placing the same file on a dark-background page: if the white disappears, the transparency is working.
To fix a genuinely flattened transparency: you need the original file with alpha intact, or a background-removal tool to regenerate the mask.
PNG vs WebP for Transparency
PNG-32 (true colour with alpha) has been the default for transparent web images since 1996. It works everywhere: every browser, every email client, every image viewer.
WebP can combine lossy color compression with an alpha channel. Use the PNG to WebP converter to test a transparent delivery copy, and retain PNG when exact color samples matter. The lossless encoding guide explains why transparency and pixel preservation are separate properties.
AVIF supports alpha in both lossy and lossless modes, meaning you can get a small transparent image (better than PNG-32 by 30-50%). However, AVIF support is still not universal, and you need a fallback for older devices.
Practical recommendation: PNG-32 for universal compatibility; lossless WebP for 26% smaller with identical quality; AVIF (if you can provide fallbacks) for maximum compression with transparency.
Creating Transparent Images
In design software (Photoshop, GIMP, Affinity Photo, Figma): use layers, erase or mask the background, then export as PNG with 'Transparency' checked. For shapes and text specifically, vector tools (Illustrator, Figma, Inkscape) export SVG natively — infinitely scalable and always transparent by default.
Online background removal: for photographs, AI-powered background removers generate an alpha mask from a non-transparent image. They detect the subject's edges, estimate hair-level alpha, and output a transparent PNG. These work well for single-subject photos against relatively plain backgrounds.
Using a converter: if you have a flat-colour background (solid white, solid green, solid blue), a colour-key tool can replace that exact colour with full transparency in one click — useful for logos and product photos shot on white.
Common Transparency Problems
White or dark halo around edges: caused by the original image having a non-transparent background blended into edge pixels during a previous flattening step. Fix by using a 'decontaminate' or 'defringe' tool that shifts the colour of semi-transparent edge pixels towards the expected final background.
Transparency lost during upload: some social media platforms and form handlers flatten transparent images onto white or black on upload. Instagram, for example, composites transparent PNGs against white. If your transparent logo appears with a white box after posting, this is the platform's doing.
Email: Outlook composites transparency against a white background. Gmail renders it against the user's selected theme (may be dark). For logos in email, you cannot rely on transparency working — design against both white and dark backgrounds.
Animation GIF transparency: only one colour can be transparent (no alpha), causing jagged edges. Use animated WebP or APNG for smooth animated transparency.
Converting Transparent Images Between Formats
When converting a transparent PNG to ordinary JPEG, the tool must flatten it against a background because JPEG has no alpha channel. The PNG to JPG converter makes an opaque delivery copy. WebP does not inherently require flattening, including when its color encoding is lossy.
When converting between two transparency-supporting formats (PNG → WebP lossless, PNG → AVIF), the alpha channel is preserved intact. The image looks identical regardless of background.
Always verify the output on several backgrounds. A checkerboard helps reveal transparent regions but can hide fine fringes. The dark-mode image checklist adds contrasting solid backgrounds and theme-specific logo tests so you can separate an intact alpha channel from poor edge colors or insufficient contrast.
SVG: The Ultimate Transparent Format
SVG (vector) images have no background pixel at all — they are defined as paths drawn on an infinite transparent canvas. There is no alpha channel to lose, no edge to halo, and no background to composite against.
This makes SVG perfect for logos, icons, and UI elements: the same 2 KB SVG looks sharp on a white page, a dark page, and a coloured page. No variants needed.
Limitations: SVG cannot represent photographs. And SVG files can contain JavaScript, making them a security risk for user-uploaded content — always sanitise SVG files from unknown sources.
Frequently asked questions
The questions people ask most about transparent images: formats and common fixes, answered directly.