Guides

Convert PNG to JPG with a Transparent Background: White, Black, or Custom Fill

Convert PNG to JPG with a Transparent Background: White, Black, or Custom Fill

JPG cannot store transparency. The moment you save a PNG with transparent pixels as a JPG, those pixels need a colour, and the converter picks one for you. White is the default. Most online tools stop there. This converter gives you three choices: white for marketplace listings and forms, black for dark themed designs, or a custom hex code for brand backgrounds. Everything runs inside your browser using the HTML5 Canvas API, with no upload and no signup. The sections below explain why JPG flattens transparency, how to pick the right fill, and how to run the conversion in three steps.

Why JPG can't keep a transparent background

JPG was designed in 1992 for photographs, where every pixel has a colour and nothing needs to be see-through. The format stores three channels: red, green, and blue. PNG, released four years later, adds a fourth channel called alpha, which controls how visible each pixel is, from fully invisible to fully solid. When the converter writes a JPG file, that fourth channel has nowhere to go. So the alpha values get flattened, and any pixel that was partly or fully invisible gets replaced by a flat colour. The standard default is white, the same one most browsers show behind an empty page. The choice of fill is what the next section unpacks.

White, black, or custom: picking the right colour

White is the safest default because most online forms, marketplace photos, and document scanners assume a light backdrop. Amazon, eBay, and Shopify all recommend white for product photography because it isolates the subject. Black works the opposite way. A logo cut from a transparent PNG and saved on a black JPG sits cleanly on dark themed websites, social posts with dark mode previews, or video thumbnails where strong contrast does the heavy lifting.

A custom fill lets you match a brand surface exactly. Type a hex value such as #0F172A for a navy theme, or paste your CSS variable for the page that will host the image. This matters when the JPG sits inside a coloured banner, a Notion block, or an email signature where any mismatch shows up as a square halo around the artwork.

Pick by the destination, not by the source file. The PNG looked fine because every visible pixel was on whatever screen background you happened to view it against. The JPG only looks right when the fill matches its eventual home. The conversion itself takes three steps.

How to convert PNG to JPG and choose a background colour

Conversion takes three steps. First, drop your PNG files into the converter at the top of the page. You can drag a single image, a folder of screenshots, or up to 50 files at once. Second, pick your fill: tap the white preset, the black preset, or open the colour picker and enter a hex code. The same choice applies to every file in the batch, so you don't have to set it for each one. Third, click Convert, then download the JPGs individually or as a single Save All bundle.

The converter uses the HTML5 Canvas API to draw the PNG over your chosen background, then encodes the flattened image as a JPG. Quality holds at 90% by default, the sweet spot for photographs. Drop it lower for smaller files, raise it for hard edged graphics where every artefact matters. The use cases that drive this conversion vary widely.

When transparent PNG to JPG matters

Transparent PNGs hit walls in several places. Government forms reject anything that isn't a flat JPG, and the Indian visa portal, the SAT system, and many UK Home Office forms all demand it. E-commerce marketplaces enforce solid backgrounds for product listings. White is the near universal requirement on Amazon, eBay, Etsy, and Walmart. Print shops prefer JPG for photographs because their colour profiles assume a fully opaque source.

Designers face the issue too. A logo exported with no background looks fine on the brand site but breaks the moment a third party uses it. Pasted into a coloured email banner, the empty pixels become hard white squares against an otherwise dark surface. Saving once with a matching fill solves the problem permanently.

Email and messaging apps round out the list. WhatsApp recompresses images into JPG anyway, so converting first lets you control the fill rather than letting the platform pick. Privacy stays intact only when the conversion happens on your device.

Browser-based privacy: what no upload actually means

Browser-based means the file never travels. Every step runs locally: the upload widget reads your PNG into memory, the Canvas redraws it on top of your fill, and the JPEG encoder writes the new file back to your downloads folder. No copy reaches a server. Switch your wifi off after the page loads and the converter still works.

That matters for sensitive uploads. Identity documents bound for visa portals, scanned signatures, medical reports, and internal product mockups never need to leave your device just to change format. Most online tools quietly hold your file for "a few hours" before deleting it. This one holds nothing because it has nothing to hold.

The trade-off is a soft cap on individual file size. Each image maxes out at 25MB because everything fits into browser memory. For larger files, downscale first with any photo editor and then convert. PNG and JPG handle the same image very differently, which the comparison below covers.

Frequently asked questions

Can I keep a transparent background when converting PNG to JPG?

No. JPG does not support transparency, so the converter fills the empty pixels with a chosen colour: white, black, or custom hex. If you need to preserve see-through areas, keep the file as a PNG or convert to WebP instead, both of which retain alpha data.

Which background colours can I choose for the conversion?

You get three preset options and one custom field: white, black, and any hex value you type. Pick white for general use and form uploads, black for dark themed designs, and a hex value (such as #1E40AF for a brand blue) when the JPG will sit on a coloured surface.

What is the alpha channel and why does it disappear?

The alpha channel is the fourth value in a PNG that controls how visible each pixel is, ranging from 0 for fully invisible to 255 for fully solid. JPG only stores three channels, so the alpha data has nowhere to go and the converter must replace those pixels with a flat colour before saving the file.

White or black fill, which is better for e-commerce product photos?

White wins for marketplace listings. Amazon, eBay, Etsy, and Walmart all recommend a white background because it isolates the product and matches their gallery layouts. Use black only when the marketplace explicitly allows it, or when your product is white and would otherwise disappear against a light backdrop.

Are my files uploaded to your servers?

No, never. Every conversion happens inside your browser, so the original PNG and the saved JPG both stay on your device. You can switch your internet off after the page loads and the converter still runs.

How do I set a custom hex colour as the background?

Open the colour picker next to the fill option and either drag the indicator to the shade you want or type a six character code in the input box. The format is #RRGGBB, where RR, GG, and BB are hexadecimal values for red, green, and blue. The same colour applies to every file in the current batch.

Can I batch convert PNG files with one chosen fill colour?

Yes. The chosen fill applies to every file in the batch, up to 50 PNGs at a time. If you need a different fill for a different set of images, run a second batch after downloading the first one.

Is converting to JPG better than keeping the PNG with transparency?

It depends on the destination. Convert to JPG when the file is going to a system that requires solid backgrounds: government portals, marketplace listings, print shops, or email attachments where size matters. Keep the PNG when the image will sit on different coloured backgrounds across different pages, or when you might edit it again later.

Drop your PNG files into the converter at the top, pick your fill, and download in seconds.