Image transparency: PNG, WebP and GIF

How the alpha channel works, why JPG has no transparent background and how to avoid jagged edges.

An image with a transparent background can be placed on any color or photo without that white rectangle around it. That's what lets a logo look good on both light and dark websites. But not every format stores transparency, and even among those that do there are important differences.

How transparency works: the alpha channel

A regular color image has three channels per pixel: red, green and blue (RGB). Formats with transparency add a fourth channel, the alpha, which says how opaque each pixel is. In an 8-bit image, alpha goes from 0 (fully transparent) to 255 (fully opaque).

The values in between are what make smooth edges possible. Hair, a shadow or the rounded outline of a letter use semi-transparent pixels to blend with whatever background is behind them.

Which formats support transparency

FormatTransparencyNotes
PNGFull (8-bit alpha)The standard for logos and icons.
WebPFull (8-bit alpha)Smaller files than PNG, ideal for websites.
GIFBinary (1 bit)Each pixel is either fully transparent or fully opaque.
TIFF and ICOFullUsed in print and system icons.
JPGNoneTransparency becomes a solid color.

Why JPG has no transparent background

JPG was created in 1992 for photographs, which usually fill the whole rectangle. Its specification simply has no alpha channel. When you convert a transparent image to JPG, every transparent pixel has to get a color. That's why ConverteTudo has the “Color in place of transparency” option: you choose the color that fills those areas, white by default.

Why edges look jagged

GIF only supports full transparency or none. The semi-transparent pixels on the edges have to be rounded to one extreme or the other, which creates a jagged outline. Worse: when the original image was prepared on a white background, a light halo is left around the drawing, very visible on dark backgrounds.

To avoid the problem:

  • Prefer PNG or WebP whenever you need smooth edges.
  • If GIF is mandatory, prepare the image on a color similar to the background where it will be shown.
  • When removing the background of a photo, use light edge smoothing so the cutout blends better.

How to create an image with a transparent background

  1. If the image has a background, remove it. ConverteTudo's Background Remover does this in your browser without uploading the photo.
  2. Save the result as PNG or WebP, never JPG.
  3. Test the image on light and dark backgrounds to check that no halo is left on the edges.

Conclusion

Transparency depends on the alpha channel. PNG and WebP store full transparency and smooth edges; GIF only stores binary transparency, and JPG stores none. For logos, icons and cutouts, choose PNG when you need maximum compatibility and WebP when the goal is a lightweight website.

Try it now

Convert your images for free, in batches and without signing up.

Open the Image Converter