Guides

Turn a transparent PNG into a JPG without ugly edges

Converting a cut-out logo, icon or product shot to JPG always means one decision: what colour fills the transparent areas. Making that decision deliberately is the difference between an invisible join and a pale rectangle.

Why transparency cannot survive the conversion

JPG has no alpha channel. Every pixel has to end up as a colour, so a converter must decide what lies behind the parts that were transparent. When nothing tells it, the result is usually black or white, neither of which may match where the image will be used.

The convert tool therefore asks for a background colour whenever the output format is JPG, and offers white, black, a colour picker and a hex field for anything else. The colour is validated before the run starts, so a typo cannot quietly export the wrong fill.

Choose the colour the image will sit on

Match the surface behind the image: white for documents and most marketplaces, the page or brand colour for a coloured section, black for a dark theme.

If the same artwork will appear on several backgrounds, export one file per background rather than compromising on a single middling colour. Naming them after the background, such as logo-white.jpg and logo-dark.jpg, saves the next person from guessing.

Soft edges and shadows are where it shows

Anti-aliased edges and drop shadows blend gradually into the transparent area. When the fill matches the destination the join disappears; when it does not, a halo appears around every curve.

A semi-transparent shadow designed for a white page turns into grey haze on a coloured one. That is a re-export, not a recolour: flatten the same source against the new background.

Keep the transparency when you can

If the destination accepts PNG or WebP, keep the alpha channel and skip this problem entirely. Flatten only when a format or a platform demands it.

Flattening is one-way: the JPG has no record that anything was ever transparent, so always keep the original PNG.

A short workflow

  • Keep the transparent original untouched
  • Convert to JPG and choose the background colour deliberately
  • Check the before and after preview at full size along the edges and any shadow
  • Name exports after the background they were made for

Try it here

  • Convert images — Convert JPG, PNG and WebP images without uploading them, with a background color for JPG results.

All guides