Skip to content
UniKit

PNG background filler

Composite a solid colour behind a transparent PNG with correct alpha blending on soft edges, or keep transparency and just re-save.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Images are processed locally in your browser with Canvas and never uploaded.

Pick an image first (PNG / JPEG / WebP / GIF all work).

Result

No result yet

Result

These are the real numbers from this run — copy them straight out.

Pick an image and the result shows up here.

What this tool does

  • Put a transparent logo on a white backdrop before sending it, so it stays visible in dark chat windows.
  • Flatten transparent product shots onto white for platforms that do not support alpha.
  • Check cut-out quality: composite onto black and look for grey halos on semi-transparent edges.

Example

Input

A 1×1 pixel [200,40,60,128] (semi-transparent red) with background #ffffff

Output

Output [227,147,157,255]: blended with alpha 0.502, 200×0.502 + 255×0.498 ≈ 227

The formula matches canvas source-over: result = foreground × alpha + background × (1 − alpha).

Frequently asked questions

Are images uploaded, and which formats work?

Nothing is uploaded — decoding and compositing both happen in your browser with Canvas. Any format the browser can decode works (PNG / JPEG / WebP / GIF and so on); formats it cannot decode, HEIC above all, show "This file is not an image the browser can decode", so convert to PNG or JPEG first.

Do soft edges end up with a dark halo?

No. Compositing is a per-pixel linear blend (result = foreground × alpha + background × (1 − alpha)), the same as canvas source-over, so feathered edges fade into the chosen colour; once a backdrop is filled the exported PNG is fully opaque (alpha 255 everywhere). The result panel reports "Pixels covered" (pixels with alpha < 255 before compositing) and "Transparent" (pixels still fully transparent afterwards, 0 when a backdrop is filled).

What does "Keep transparency (no backdrop)" do?

It skips compositing entirely and simply re-exports the image as a PNG, which is handy for converting the format or saving a copy; the result panel then shows transparent as the background and 0 covered pixels. This tool only touches pixel colour, never the size.

Keywords:png backgroundadd background to pngflatten transparency

Related tools