What transparency actually is
A PNG stores four numbers per pixel: red, green, blue, and alpha. Alpha is opacity — 255 means the pixel is solid, 0 means it is not drawn at all, and the values in between are the soft edges that stop a curve looking like a staircase. A logo saved as a PNG is mostly zeros: a small amount of solid colour, a thin ring of partial alpha around it, and a large field of nothing.
A JPEG stores three numbers per pixel. There is no fourth, no optional extension that adds one, and no encoder setting that turns it on. This is not a limitation of any particular program; it is the format, settled in 1992, before transparency on screens was a common requirement.
So the conversion is not a translation. Something has to be invented for every transparent pixel, and the only sensible thing to invent is a colour. That colour is called the matte, and picking it deliberately is the difference between a logo that looks placed and a logo that looks stuck on.
Why the result is sometimes black
The colour underneath a fully transparent pixel is still recorded — alpha says do not draw it, but the red, green and blue values are sitting there. In most PNGs, produced by most exporters, those hidden values are zero. Zero is black.
Software that flattens by simply discarding the alpha channel therefore produces a black background, and it does so without warning because from its point of view nothing was lost. Software that composites properly asks what to composite onto, and the usual default is white. The same PNG can come out of two programs looking completely different for this reason alone, and neither program is broken.
This converter composites. The matte is painted across the whole frame first, and the picture is drawn on top of it, so partial alpha blends into the matte rather than into whatever happened to be in the buffer. The preview shows the flattened result before anything is written, because a matte chosen blind is the most common regret in the whole operation.
Choosing the matte
- Work out where the JPG is going to sit. That is the only question. The matte should be the colour of the surface behind it, because the picture is about to have that surface baked into its edges permanently.
- For a document, a form or a print, white is almost always right, and it is the default here.
- For something going on a dark page, pick black or the page's own dark tone with the colour picker. A white-matted logo on a dark background shows a pale halo that no amount of later editing removes cleanly.
- For a photograph with a transparent corner — a rounded crop, a cut-out — sample the picture's own edges. The button in the rail averages the outermost pixels and uses that, which hides the seam better than any fixed colour.
- Look at the preview at full size before saving. Soft edges are where a wrong matte shows, and they are exactly what a thumbnail hides.
When the answer is to keep the PNG
If the picture is going to be placed on more than one background, do not flatten it. A matted JPEG is finished; it can only ever sit on the colour it was matted onto. A PNG can be dropped onto anything and still look placed.
If the picture is a logo, an icon, a diagram or a screenshot of text, there is a second reason to keep it. Those are exactly the pictures JPEG is worst at: flat colour and hard edges give the encoder nothing to average, so it produces ringing around every edge and faint blocks in every flat field. A 40 KB PNG of a logo often becomes a 90 KB JPEG that looks worse. Converting in that direction costs size and quality at once.
The case for converting anyway is compatibility, and it is a real case. An upload form that accepts only JPEG, a system that will not take alpha, a printer’s workflow that expects flattened files — those are good reasons, and the right response is to pick the matte carefully rather than to avoid the conversion.
Three questions people ask
- Why did my transparent logo come out with a black background?
- Because something flattened it onto black rather than white. A transparent pixel has a colour value underneath the transparency, and in a great many PNGs that value is zero — black. Software that ignores the alpha channel and reads only the colour therefore produces black. This converter paints the matte first and then draws the picture on top, so what you choose is what you get.
- Can a JPEG have a transparent background at all?
- No. The format has three channels and no fourth. There is no setting, no encoder and no trick that adds one — a file with transparency is a PNG, a WebP, a GIF or an AVIF.
- The edges of my logo look fuzzy and grey. What went wrong?
- Nothing went wrong; the matte was the wrong colour. Anti-aliased edges are partly transparent, so they blend with whatever is behind them. A dark logo matted onto white and then placed on a dark page shows a pale halo of the white it was flattened onto. Match the matte to the background it will sit on, or keep the PNG.
Decoding and encoding both happen on this computer.