Transparent PNG to JPG: why the background turns black or white

You convert a PNG with a transparent background to JPG and the background comes out black, or white, or with an ugly halo around your subject. That's not a bug in the converter. It's a property of the format.

How transparency works in PNG

A PNG pixel has four values: red, green, blue and alpha. Alpha says how opaque the pixel is, from 0 (fully transparent) to 255 (fully opaque). Soft edges and shadows use values in between.

JPG pixels have only three values, red, green and blue. There is nowhere to store alpha. So when you convert, every transparent or semi-transparent pixel has to be turned into a solid color.

Why black sometimes appears

Fully transparent pixels in a PNG often have their color values set to black, because the color doesn't matter when nothing is visible. If software throws away alpha without blending against a background first, those hidden black values become visible. Good converters composite the image over a background color before saving. This converter does that, and lets you choose the color.

Choosing the right background

  • White is the safe default for documents, email and most websites.
  • The exact color of the page or slide where the image will be used gives the cleanest edges, especially around soft shadows.
  • Black suits dark interfaces and video overlays.

Fixing the halo around edges

A light or dark fringe appears when anti-aliased edge pixels were blended against one background and then placed on another. Convert against the background where the image will actually sit and the fringe disappears, because the edge pixels blend into the same color.

If you need to keep transparency

JPG isn't an option. Keep it as PNG, or convert to WebP, which supports transparency and usually makes a smaller file. For simple graphics on older systems, GIF offers on/off transparency only.

Try it

Open the PNG to JPG converter, drop your image in, and use the swatches under "Fill transparent areas with". The preview updates immediately, so you can compare backgrounds before downloading.

More guides: PNG vs JPG vs WebP vs AVIF: which image format should you use? How to convert PNG to JPG without losing quality How to reduce PNG file size without ruining the image Favicon sizes and formats: what you actually need in 2026