Skip to content
AgileLogics

PNG to JPG Converter

Converts a PNG image to JPG format using an in-browser canvas. Transparent areas are filled with white, since JPEG has no transparency.

How it works

Choose a PNG image and click Convert.

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

  1. Click Choose File and pick a PNG from your device.
  2. Click Convert.
  3. 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

Frequently asked questions

What happens to the transparent background?
JPEG can't store transparency, so the tool paints a solid white (#ffffff) background first and draws your PNG on top. Fully transparent pixels become white, and half-transparent edges such as soft shadows and anti-aliasing are blended toward white.
Can I choose a different background color?
No, the background is always white. If the image will sit on a dark or colored page, either keep it as PNG or fill the background with the right color in an image editor before converting, otherwise you'll see a light fringe around soft edges.
What JPEG quality does it use?
A fixed 0.92 on the canvas API's 0 to 1 scale, which keeps photos looking close to the original. There's no quality slider here. To trade more quality for a smaller file, run the JPG through the image compressor afterwards.
Is my PNG uploaded?
No. The browser decodes the PNG, draws it onto a canvas and encodes the JPG locally. The file never leaves your device.
Will the JPG be smaller than the PNG?
For photographs, almost always, often by a large margin. For screenshots, logos and flat graphics the saving is smaller and the JPG can show smudgy artifacts around text and sharp lines.