Image Tips

How to Convert PNG to JPG Without Getting a White Background

You've got a logo or icon with a transparent background as a PNG, and you need to convert it to JPG. You run it through a converter — and suddenly it has an ugly white box around it. Here's why this happens and how to fix it.

Why Does PNG to JPG Add a White Background?

It comes down to a fundamental difference between the two formats. PNG supports an alpha channel — a fourth channel alongside red, green, and blue that stores transparency information. Each pixel can be fully transparent, fully opaque, or anywhere in between.

JPG doesn't have an alpha channel at all. It simply cannot store transparency. When you convert PNG to JPG, something has to fill those transparent pixels — and most tools default to white (RGB 255, 255, 255). The result is a white background where transparency used to be.

How to Choose the Fill Colour When Converting

LovePDFImg's PNG to JPG converter lets you pick exactly what colour fills the transparent areas. Instead of defaulting to white, you can match it to the background of wherever you'll be using the image.

👉 Try it free: PNG to JPG — Choose Your Background Colour
Set a custom hex colour for the transparency fill before converting.
  1. Open PNG to JPG on LovePDFImg.
  2. Upload your transparent PNG.
  3. In the Background color field, enter the hex code for your target background — for example #1A1A2E for a dark navy, or #F5F5F5 for light grey.
  4. Click Convert and download your JPG.

What Colour Should You Use?

Match it to wherever the image will appear:

If you're not sure what hex code your background uses, try LovePDFImg's Image Color Picker — click anywhere on a screenshot of your website or document to get the exact hex value of that background colour.

Alternative: Keep Transparency — Use WebP Instead of JPG

If you're converting to JPG purely for file size reasons but you need to preserve the transparent background, consider PNG to WebP instead. WebP supports transparency (just like PNG) but achieves 25–35% smaller file sizes. Modern browsers and most current platforms support WebP without any issues.

This way, you get the smaller file size benefit without sacrificing the transparent background.

When Is It Okay to Have a White Background?

Often, a white fill is exactly what you want:

In these cases, the default white fill from PNG to JPG conversion is actually the correct result.

Can You Remove a White Background After Converting?

Technically, once a PNG is converted to JPG, the transparency information is permanently gone. The white pixels are just regular white pixels — the converter has no way to know which white pixels "were" transparent and which were genuinely white in the original. So no, you can't recover transparency from a JPG.

The fix is to go back to the original PNG and re-convert it using the correct background colour fill. If you no longer have the original PNG, you'd need to use an AI background remover (outside LovePDFImg's scope) to recreate the transparency.

Batch Converting Multiple Transparent PNGs

If you have a folder of logo files or icons that all need converting with the same background colour, use Batch Image Converter. Upload all your PNGs, set the output to JPG, choose your background colour, and convert everything at once.

Key Takeaways