PXPixelConvert
PixelConvert menu
← All guides

Reference guide · cited sources

Converting Images Without Losing Transparency

Some conversions preserve a transparent background perfectly, some discard it permanently, and the difference is decided entirely by whether the destination format has an alpha channel. Knowing which is which before you convert saves you from the most common and least reversible image mistake there is.

By Prashantkumar Kishanrao Sundge · Published · Reviewed

What this guide establishes

  • PNG to WebP, WebP to PNG, and PNG to ICO all keep transparency. Anything to JPEG destroys it.
  • There is no setting that makes a JPG keep transparency — the format has no alpha channel.
  • If you must produce a JPG, choose the flattening colour to match the destination, not whatever the tool defaults to.
  • Converting a JPG to PNG does not bring transparency back. Nothing can; it was never stored.
  • Check whether your source actually has transparency before converting — many files that look transparent are not.

The rule that decides every case

A conversion preserves transparency if and only if the destination format has an alpha channel to store it in. That is the whole rule, and every specific case below follows from it.

PNG, WebP, SVG, AVIF, TIFF, and ICO all have one. JPEG does not — not as a disabled option or a quality trade-off, but absent from the format entirely. A converter writing a JPG has no choice but to decide what colour the transparent pixels become.

This is why the question "how do I convert PNG to JPG and keep the transparent background" has no good answer. It is not a limitation of any particular tool, and no converter anywhere can do it. If you need both the transparency and the file, you need a different format.

Conversions that keep transparency

PNG to WebP preserves alpha fully, including partial transparency at antialiased edges, and usually produces a substantially smaller file. For web delivery this is often the best move available — you keep every pixel of transparency and reduce the payload.

WebP to PNG also preserves it, which is the conversion people reach for when they have saved an image from a website and need it in an older editor or a document tool that rejects WebP. The resulting PNG is typically much larger, because PNG is lossless and WebP is designed to be small, but the transparency arrives intact.

PNG to ICO preserves transparency in each embedded icon size, which is what makes a favicon sit cleanly on a browser tab regardless of the tab colour.

PNG to SVG is a different kind of operation. Tracing produces vector paths rather than converting pixels, and regions the tracer treats as background simply have no shape drawn over them — so the result behaves as transparent. But this is an approximation of your artwork, not a preservation of it, and it suits flat logos rather than photographs.

One caveat applies to all of these: a conversion can only preserve transparency the source actually had. If the original has an opaque white background, every output will have an opaque white background too.

Converting to JPG when you have no choice

Sometimes the destination genuinely requires JPG — a marketplace listing, an older upload form, a system that rejects everything else. The transparency is going to be flattened; the only question is whether you control the result.

Choose the flattening colour to match where the image will actually sit. White for a white page. The exact header colour for a dark header. The product tile background for a marketplace. A tool that silently defaults to white is making this decision for you, and it is wrong every time the destination is not white.

Soft edges are where the cost shows most. The antialiased pixels around a shape are partially transparent, so flattening blends them with the background colour rather than simply placing them on it. The result is a thin fringe of that colour tracing the outline — invisible against a matching background, obvious against anything else, and not cleanly removable afterwards because those pixels are now ordinary opaque ones.

Keep the original. The flattened JPG is a derivative built for one destination, and the moment the destination changes you will need to go back to the file that still has its alpha channel.

What you cannot undo

Converting a JPG to PNG does not restore transparency. The PNG gains an alpha channel, but every pixel in it is fully opaque, because the JPG contained no information about which pixels were background. The conversion gives you somewhere transparency could live; it does not decide what should go there.

This is the single most common misunderstanding about image conversion, and it is worth stating without hedging: there is no tool, setting, or format that recovers a transparent background from a flattened file. The information was discarded when the JPG was written.

What you can do is recreate it, which is an editing task rather than a conversion. Convert to PNG or WebP so an alpha channel exists, then remove the background in an image editor or with a background-removal tool. Two steps, in that order, and the second one is where the actual work happens.

Automatic background removal has become genuinely good for clear subjects against contrasting backgrounds. It still struggles with hair, fur, mesh, glass, smoke, and any subject sharing colours with what is behind it — and a flattened JPG of such a subject may simply not be recoverable to a usable standard.

Check whether your file is actually transparent

A surprising number of transparency problems start with a file that never had any. An image with a white background, viewed on a white page, is visually identical to a transparent one until it moves somewhere else — at which point the white rectangle appears and the file gets blamed for losing something it never had.

The quickest check is to open the file against a contrasting background. Drop it onto a coloured slide, view it in an editor with a dark canvas, or open it in a browser tab with a dark theme. If a rectangle of background appears, the file is opaque.

The format itself is a strong hint but not proof. A PNG can perfectly well be fully opaque — the format supports transparency, it does not require it. Receiving a PNG is no guarantee that anything in it is transparent.

Checking before you convert matters because it changes what the problem is. If the source is already opaque, no choice of output format will help, and what you need is background removal rather than a different converter.

Choosing a destination format

If the destination accepts WebP, use it. It keeps full alpha, handles photographic content far better than PNG at a fraction of the size, and is supported by every current browser. The main reason not to is a destination whose accepted-format list predates it, which is common in upload forms and email.

If you need maximum compatibility, use PNG. It is accepted essentially everywhere, it is lossless, and its transparency support is complete. The cost is file size, particularly for photographic content.

If the artwork is genuinely vector — a logo, an icon, flat shapes — and you have the original vector file, use SVG. It scales to any size, stays sharp at every display density, and transparency is inherent rather than stored. Prefer an official vector file over tracing a raster one.

Use JPEG only when the destination requires it and you have accepted that transparency is being flattened. It is the right choice for photographs that do not need transparency and the wrong choice for anything that does.

A workflow that avoids the problem

Keep the transparent original as your master and never edit it in place. It is the only version with options — every other format you need can be generated from it, and none of them can be converted back into it.

Generate derivatives per destination rather than converting once and reusing. A JPG flattened onto white for one marketplace is not the file to send to a client with a dark brand palette, and discovering that after the fact means redoing the work from a file that may no longer exist.

Name the derivatives so their purpose is obvious — including the background colour where one was baked in. A file called logo-on-white.jpg tells the next person what they are looking at in a way logo-final-2.jpg does not.

And check the result against the real destination before you commit to it. A flattened logo looks perfect in a file browser with a white background and reveals its problem only when it lands on the page it was made for.

What happens to transparency in common conversions

ConversionTransparencyWhat to expect
PNG → WebPPreservedFull alpha kept, usually a much smaller file
WebP → PNGPreservedAlpha kept; file typically much larger
PNG → ICOPreservedKept in every embedded icon size
PNG → SVGEffectively keptTraced approximation; suits flat logos, not photos
PNG → JPGDestroyedFlattened onto a colour you should choose yourself
WebP → JPGDestroyedSame flattening; pick the background deliberately
JPG → PNGNone to recoverOutput is fully opaque; nothing is restored
GIF → PNGPartly improvedOn/off transparency kept; jagged edges stay jagged

How this guide was written

This is a reference guide. It explains published specifications, platform rules, and format behavior, and every factual claim is attributed to the sources listed below. It does not report an in-house PixelConvert measurement, and no result here should be read as one.

Read how PixelConvert separates measured and reference guides →

Limitations

  • This guide describes format capabilities and conversion behavior with citations; it reports no in-house PixelConvert measurement.
  • PixelConvert converts between formats and does not perform background removal, which requires an image editor or a dedicated tool.
  • Whether a specific destination accepts WebP, AVIF, or SVG changes over time and should be verified rather than assumed.

Frequently asked questions

How do I convert PNG to JPG and keep the transparent background?
You cannot. JPEG has no alpha channel, so every transparent pixel must be given an opaque colour before the file can be written. This is true of every converter. If you need the transparency, keep the PNG or use WebP.
Which conversions keep a transparent background?
PNG to WebP, WebP to PNG, PNG to ICO, and PNG to SVG all preserve it, because each destination format has somewhere to store alpha. Any conversion to JPEG destroys it.
How do I get a transparent PNG from a WebP?
Convert it directly — WebP to PNG preserves any alpha the source had, including soft antialiased edges. Expect the PNG to be considerably larger, since it is lossless. If the WebP had no transparency, the PNG will not have any either.
Can I recover transparency from a JPG?
No. The information was discarded when the JPG was written and is not stored anywhere in the file. You can recreate it by converting to PNG or WebP for the alpha channel and then removing the background in an editor, but that is new editing work, not recovery.
How do I check whether my image actually has transparency?
Open it against a contrasting background — a coloured slide, a dark editor canvas, a dark-themed browser tab. If a rectangle of background appears, the file is opaque. A PNG can be fully opaque, so the format alone proves nothing.
What background colour should I pick when converting to JPG?
The colour of wherever the image will actually be displayed, not the tool's default. Flattening onto white and then placing the image on a dark header produces a visible white box that cannot be cleanly removed afterwards.

References