How do you convert a PNG to JPG without a black background?
You fill the transparent areas with a solid color before encoding, because JPEG has no alpha channel. This converter does that automatically: it paints a white canvas the same size as your PNG, draws the image on top, and saves the result as a JPEG at quality 0.92. Transparent regions come out white rather than black or random noise.
Converting a PNG
- Click Choose File and pick a PNG from your device.
- Click Convert.
- Check the preview, then click Download to save
converted.jpg.
The output keeps the original width and height in pixels. A 2400 × 1600 PNG gives a 2400 × 1600 JPG.
The file picker isn't limited to PNG. WebP, GIF, BMP and other formats your browser can open go through exactly the same steps and come out as JPEG with a white background. An animated GIF or WebP becomes a single still frame.
What happens to each kind of pixel
| Pixel in the PNG | Pixel in the JPG |
|---|---|
| Fully opaque | Same color (subject to JPEG compression) |
| Fully transparent | Pure white, #ffffff |
| 50% transparent black | Mid grey, roughly halfway between black and white |
| Soft, anti-aliased edge of a logo | Blended toward white |
That last row is where people get caught out. A logo exported with a transparent background has edges that fade out over a pixel or two. After conversion those edges are mixed with white, which looks perfect on a white page and leaves a pale halo on a dark one. If your target background is dark, keep the PNG, or convert to WebP, which supports transparency.
Why quality 0.92
The JPEG is produced by the browser's own encoder through canvas.toDataURL('image/jpeg', 0.92). The second argument is a quality from 0 to 1, and the tool sets it explicitly so the result doesn't depend on whichever default your browser happens to use. In practice 0.92 is a sensible middle ground: most photos look indistinguishable from the source, and files are much smaller than lossless PNG. Because the encoding is done by your browser, the same PNG can produce a slightly different file size in Chrome than in Firefox or Safari.
JPEG compression works on 8 × 8 pixel blocks and discards fine detail the eye is less sensitive to, as described in the ITU-T T.81 specification. Photographs hide that loss well. Flat colors with crisp edges don't, so text in a screenshot can pick up faint ringing around each letter.
When converting is a good idea, and when it isn't
| Image | Convert to JPG? | Reason |
|---|---|---|
| Photo saved as PNG by a phone or screenshot tool | Yes | Big size saving, little visible change |
| Product shot for a site with a white background | Yes | White fill matches the page |
| Logo or icon with transparency | Usually no | Loses transparency, edges blend to white |
| Screenshot full of small text or code | Usually no | JPEG artifacts around letters; PNG stays sharp |
| Image you'll keep editing and re-saving | No | Every JPEG save loses a little more detail |
Size and metadata
Expect a large drop in file size for photos and a modest one for graphics. If the JPG is still too heavy, the image compressor lets you pick a lower quality, and the image resizer can cut the pixel dimensions first, which usually saves more than lowering quality.
The new file is built from canvas pixels, so text chunks, color profile information and any other metadata in the PNG aren't carried over. JPEG itself can store EXIF, but this tool writes none.
Privacy
Everything happens in the page. The PNG is read with the browser's FileReader, drawn on a canvas and encoded there, with no network request involved. You can disconnect from the internet after the page loads and the converter still works.
Going the other way, from a JPEG to a lossless PNG, is the job of the JPG to PNG converter. Just remember that converting back won't recover detail that JPEG compression has already removed. For transparency plus small files, the WebP converter is the better destination.
Last updated