Skip to content
Create more with Morphed(opens in a new tab)

Paid AI

E-commerce

PNG to JPG With a Transparent Background: White, Black or Your Own Colour

Why a transparent PNG turns white or black when saved as JPG, tested exports with white, black and custom backgrounds, and when a product image should stay transparent instead.

Author
ImageWand Team
Published
Reading time
6 min read
Sources checked
November 24, 2026

morphed.app · Paid AI tools

Put this guide to work in a fresh creative project.

Reading "PNG to JPG With a Transparent Background: White, Black or Your Own Colour"?

Explore AI photo editing in Morphed (opens in a new tab)

Paid AI tools. Separate account and upload in Morphed.

A watercolor portrait surrounded by flowers

A portrait with a painterly feel

Soft watercolor, delicate flowers, a pale backdrop.

AI-created concept image. Results vary.

See an example

From transparent to a solid background

A sample cut-out placed on white. Soft edges blend into the background colour.

Transparent cut-out example

Transparent input

Checkerboard indicates transparency

Same cut-out filled with a white background

On white

Opaque output

This is a prepared transparent sample, not a new AI background-removal result.

A PNG can have transparent and partly transparent pixels. A JPG cannot: every pixel must be a solid colour. So when you save a transparent PNG as JPG, something has to fill the transparent areas. That step is called flattening, and the colour used decides how your image looks.

The test image

We drew an original product-style cutout for this test: an orange mug with a soft drop shadow and a blue tag at 45% opacity, on a fully transparent background (no real product photo). The shadow and the tag are partly transparent, which is where flattening shows.

We converted it with ImageWand’s PNG to JPG converter in Google Chrome 158 on 24 November 2026: once with the default white background, once with black and once with a custom yellow (#fde68a), then once more to PNG.

Four versions of an orange mug illustration: the transparent PNG on a checkerboard, then JPG exports on white, black and pale yellow. The shadow and the blue tag take on each background colour.
Left to right: the transparent PNG (checkerboard shows transparency), and the converter’s JPG exports with white, black and #fde68a backgrounds. Synthetic test artwork.
ExportTool settingBytesTransparent areas becomeBlue tag (45% opacity) becomes
Source PNG—16,240transparentrgb(56, 189, 248) at 45%
JPG, whiteDefault26,826rgb(255, 255, 255)rgb(165, 224, 252)
JPG, blackBackground #00000024,813rgb(0, 0, 0)rgb(25, 85, 113)
JPG, customBackground #fde68a25,579rgb(253, 230, 137)rgb(164, 211, 187)
PNGPNG output41,411still transparentstill 45% transparent

All five files are 1000 × 750 px. Colours were measured from the downloaded files, averaged over a 6 × 6 px patch.

How flattening works

Each partly transparent pixel is blended with the background in proportion to its opacity (simple alpha compositing):

result = opacity × pixel colour + (1 − opacity) × background colour

For the tag, opacity is 115 out of 255 (0.451). On white, the red channel is 0.451 × 56 + 0.549 × 255 = 165, which is exactly what the JPG contains. On black it is 0.451 × 56 = 25. The arithmetic matches every measured value above to within one or two levels of JPEG rounding.

That is why the shadow looks right on white but turns into a solid grey smudge if you later put the white JPG on a coloured page: the white is now part of the pixels.

Magnified shadow edge: the transparent PNG displayed on white, and the white-background JPG. They look the same.
Shadow edge at 4× magnification. Left: the PNG displayed over white. Right: the JPG flattened on white. They match closely (SSIM 0.9992). The difference only appears when the background changes.

Why some apps give you black

Browsers save images through a drawing canvas. The HTML standard says that when a canvas is saved to a format without transparency, such as JPEG, it is composited onto opaque black unless the app draws a background first. To confirm it, we saved the same cutout from a plain canvas with no background, outside any ImageWand tool: the corner pixels came out rgb(0, 0, 0), and the file was byte-for-byte identical to the converter’s black-background export.

ImageWand’s converter paints the background you choose (white by default) before encoding, so you do not get black by accident.

Transparent or white: which does a product image need?

UseKeep transparent (PNG or WebP)Flatten on white (JPG)
Listing photo where the marketplace asks for a white backgroundYes. Check the marketplace’s current image rules first
Product placed on different page or banner coloursYes
Ad or collage you will compose laterYes, as the masterExport when finished
Email or document that may not handle transparencyYes
Print order from a photo labUsually. Ask the lab

Our marketplace guides list what we could verify for Amazon and eBay, with links to the official pages. Rules change, so confirm on the marketplace before you upload.

A workflow that works

  1. Start with a transparent cutout. If your photo still has its original background, the background remover can cut it out. It is an AI tool: it needs an account and 1 credit per successful result, and the image is processed on a server. Check the edges at 100% zoom; hair, glass and soft shadows are the hard parts.
  2. Keep the PNG as your master. Save the transparent file before you flatten anything.
  3. Flatten for the destination. Use the white background tool for a white product image, or the PNG to JPG converter, which runs in your browser, to pick any colour.
  4. Need transparency on the web? Convert to WebP instead with PNG to WebP. It keeps transparency, and in our compression benchmark it made smaller files than PNG for a transparent graphic.

Every file in the table can be downloaded from the links above. The test was run with tests/content/article-assets.mjs in the ImageWand repository.

Sources

Platform rules change. These are the official pages this guide was checked against on . Always confirm the current rule before you submit.

  1. HTML Standard: Serializing bitmaps to a file · WHATWG · accessed
  2. Compositing and Blending Level 1: Simple alpha compositing · W3C · accessed

Frequently asked questions

Why did my transparent PNG get a black background as a JPG?

JPG cannot store transparency, so every pixel needs a solid colour. The HTML standard says a browser canvas saved to a format without transparency is composited onto opaque black unless the app paints a background first. ImageWand's PNG to JPG converter paints white by default, and you can pick another colour.

Can I get the transparency back from the JPG?

No. Flattening mixes the background colour into every partly transparent pixel. Keep the transparent PNG as your master copy and export a new JPG when you need a different background.

Should product photos be transparent or on white?

Use whatever the marketplace or page asks for. A flattened JPG on pure white is the usual choice where a white background is required; a transparent PNG or WebP is better when the same cutout is placed on different backgrounds.

Written by

ImageWand Team · Editorial Team

The ImageWand editorial team writes practical guides on image editing, file formats, compression, and platform-specific image requirements. Each guide lists the official sources we checked and when, and says plainly which steps ImageWand can and cannot do. About ImageWand