PRACTICAL GUIDE

What Happens to Transparency When You Convert PNG to JPG

Why a transparent logo turns into a white or black rectangle, how to tell in advance, and which formats keep an alpha channel.

Last updated

JPEG has no concept of transparency

A PNG can store an alpha channel: a per-pixel record of how transparent that pixel is. JPEG has no such channel — it was designed for photographs, where every pixel is opaque. So converting PNG to JPG does not preserve transparency badly; it cannot preserve it at all. The transparent areas have to become some colour, and the converter decides which.

Why some converters give you a black background

A blank canvas in a browser starts out as transparent black. If a converter draws your image onto that canvas and exports it as JPEG without filling the background first, every transparent pixel is flattened onto black. That is the origin of the familiar problem of a logo that arrives sitting in a black box.

Our converter fills the canvas with white before drawing, so transparent areas become white. That is the more useful default for logos and diagrams, but it is still a choice being made for you — if your artwork was designed for a dark background, white is just as wrong as black would have been.

Watch for fringing around the edges

Anti-aliased artwork has semi-transparent pixels along its edges, and these blend with whatever background they land on. A logo with soft edges drawn for a dark background will show a faint dark halo once flattened onto white. It is subtle at full size and obvious once the image is placed on a page of a different colour.

How to check whether your PNG has transparency

Open it in an image viewer that shows a checkerboard pattern behind transparent regions, or simply drop the file onto a coloured background — a browser tab with a dark theme works — and see whether the corners disappear. If the file came from a design tool as a logo, an icon or a cut-out, assume it has alpha until proven otherwise.

Convert to WebP instead when you need both

WebP supports transparency and compresses far better than PNG for most content, which makes it the natural choice when you want a smaller file and an alpha channel at the same time. It is supported by every current mainstream browser. Keep PNG when the file has to be opened by older software, or by a system that only accepts a short list of formats.

When flattening to JPG is the right answer

If the image is a photograph with no meaningful transparency, or if it is going somewhere that only accepts JPG — many upload forms do — then flatten it deliberately. Place the artwork on the background colour it will actually be shown against before exporting, so the edges blend correctly instead of being repaired later.

Frequently asked questions

Can I get the transparency back after converting to JPG?

No. The alpha channel is not stored in the JPEG, so the information is gone. You would have to cut the subject out again by hand. Keep the PNG original.

Why is my logo suddenly on a black rectangle?

The converter flattened the transparent pixels onto an unfilled canvas, which is black. Convert from the original PNG with a tool that fills a background colour, or place the logo on the intended background yourself before exporting.

Does WebP really support transparency?

Yes, in both its lossy and lossless modes. That combination — alpha plus efficient compression — is one of the main reasons to prefer it over PNG for web graphics.

Is converting JPG to PNG a way to add transparency?

No. It produces a lossless copy of an opaque image. The PNG will have an alpha channel available, but every pixel in it will be fully opaque until something actually erases part of the picture.

Explore all image tools →