Skip to content
All guides

A little guidance

PNG to JPG: how to choose the background color

Convert a transparent PNG to JPG with a white or custom background. See how transparent edges change and when to keep PNG or WebP instead.

Advertisements

Convert to JPG with a white background

Real example: transparent dice on white and dark backgrounds

The sample PNG has genuine transparent pixels. We exported it twice at the same 800 × 600 dimensions and 80% JPG quality, changing only the background fill.

Start with these files

Compare the actual downloads

The dice PNG in Image Format Changer with JPG, Compress 80% and a white Background swatch in the toolbar and in its row.
Actual conversion settings for the white result. The row shows the prepared JPG size. View full size
Colored dice with transparent corners and shadows.
Before · transparent PNG
The exported dice JPG with white corners.
After · JPG on white
The exported dice JPG with dark corners.
After · JPG on #191110
ExportBackgroundActual file size
White JPG · 800 × 600#FFFFFF25,446 bytes
Dark JPG · 800 × 600#19111028,886 bytes

The images below are the original PNG and actual JPG downloads, not illustrations. The checkerboard behind the PNG is a display aid, not part of that source image.

Repeat this example

  1. Download and add the transparent dice PNG. In the toolbar, choose JPG and turn on Compress at 80%.
  2. Open the Background swatch, enter #FFFFFF and download. Then change only Background to #191110 and download again.
  3. Open both JPGs and compare their corners and soft shadows. Both results have solid backgrounds.

Check your download

Both JPGs are 800 × 600 with solid white or dark corners and no alpha channel. The dark fill is set to #191110; lossy JPG encoding can shift individual pixel values slightly.

A common mistake

Converting a JPG back to PNG does not restore its original transparency. Keep the source PNG for future background choices.

Try the white-background settings

Sources and credits

Dice image: Daniel G., Ed g2s and CyberShadow · CC BY-SA 3.0. The supplied PNG is unchanged. Resized, converted and background-filled versions are shared under the same license.

Why does a transparent PNG get a solid background in JPG?

JPG cannot keep a transparent background. To convert a transparent PNG to JPG with a white background, choose JPG and set the background fill to #FFFFFF before downloading. Choose a different fill if the image needs to match a colored page. Transparent and partly transparent pixels blend with that fill; the downloaded JPG has a solid background. The white and dark dice downloads above show the difference using the same source image.

Choose the fill before downloading

Add the source images and choose JPG in the toolbar. When an image has detected transparency, a Background swatch appears in the toolbar and in that image’s row: open it and choose a color or enter a six-digit hexadecimal value such as #FFFFFF. The toolbar color applies to images without their own settings; a row or the image window can use a different color. Choose Download to prepare and save the JPG.

Why is a row’s background control unavailable?

A PNG file is not necessarily transparent. It can contain fully opaque pixels, including a painted white background. The tool checks image pixels and only offers the Background control when transparency can be flattened into JPG. Choosing a new fill will not replace an existing opaque background or remove a subject from a photograph.

Inspect soft edges

Partially transparent pixels, such as anti-aliased logo edges and shadows, blend into the chosen background. A dark logo may look different on white than on charcoal. Select the thumbnail to open the image window and switch between Original and Result before downloading. JPG quality changes may also introduce artifacts around fine text or sharp edges; choosing higher quality cannot recreate detail already lost in the source.

When to keep PNG or WebP

Keep PNG or WebP if the image must sit over different backgrounds later. Once transparency has been flattened into JPG, converting that JPG back to PNG does not recover it. Preserve the transparent original separately. Existing transparency can be retained in PNG or WebP output, but simply selecting PNG does not make an opaque image transparent.

  • Image Format Changer

    How to convert JPG, PNG and WebP without uploading

    Convert images in batches on your device. Compare JPG, PNG and WebP, export ICO icons, set individual file options and follow a practical conversion example.

  • Image Format Changer

    How to reduce image file size: quality vs. dimensions

    Compare JPG quality at 90%, 80% and 60%. Learn when resizing helps, why a converted image can be larger and how to choose a useful file-size tradeoff.

Advertisements