Short answer
To make an image transparent, store an alpha value of zero on the pixels that should show through, then save a format that keeps that value. PNG can store alpha. JPEG cannot. Changing a JPG into a PNG only swaps the container, so the pixels stay opaque. CSS opacity fades the whole element. It does not punch a hole in the file.
Last verified against the sources listed below.
Key takeaways
- JPEG has no alpha channel. MDN says it does not support one, so every pixel is stored as opaque.
- PNG can store an alpha sample. Zero means fully transparent. The maximum value means fully opaque.
- A JPG to PNG conversion does not invent transparency. It only re-encodes the same opaque pixels.
- CSS opacity fades the entire element, including its contents. It is not a per-pixel hole in the file.
- Preview the PNG on a colored background. A white-looking edge may still be solid white pixels.
How to make an image transparent depends on a channel the file may not have. MDN’s image format guide says JPEG does not support an alpha channel. PNG is the format it prefers when transparency is needed, and it describes PNG as having full alpha transparency.
A converter that only changes JPG to PNG does not add that channel. The pixels stay opaque. The rest of this page is how a real alpha sample gets written, and how to tell a faded element from a hole in the picture.
What do you need before the background can disappear?
You need three things. You need a picture. You need a format that can store an alpha sample. You need a way to set that sample, which a format converter is not.
MDN lists JPEG as image/jpeg with extensions .jpg and .jpeg, and PNG as image/png. In the JPEG color table, both “greyscale with alpha” and “true color with alpha” are marked as not supported. PNG’s description says it features full alpha transparency support.
The PNG specification makes the sample explicit. An optional alpha channel stores opacity. Zero means fully transparent, and the maximum value means fully opaque.
Sample depths range from 1 to 16 bits. If every alpha sample is already at the maximum, the file may omit the channel, and the image is still fully opaque.
Adobe’s raster guide, updated 28 September 2026, says the same split in tool language. PNG supports transparency with no quality loss. JPEG is lossy and removes some image data. Photoshop creates raster images by default, and each pixel stores a color.
Why does converting JPG to PNG leave the picture solid?
Because the source never stored a transparent pixel. JPG to PNG conversion does not create transparency. It changes the container. It does not invent an alpha sample.
The JPG to PNG converter decodes the JPEG in the browser and re-encodes it as PNG. Nothing is uploaded. The output type is image/png.
Transparency is kept only when the source actually had it. JPEG does not support transparency, so there is nothing to keep. The downloaded PNG is a lossless copy of opaque pixels.
That still has a use. PNG preserves the image data, which is what Adobe says about lossless PNG. You might want that before a later edit.
You do not get a see-through background from the conversion step. What a JPG is is a photo file without alpha.
What a PNG file is is the format that can hold the alpha once some other tool writes it. The converter does not perform that write.
web.dev’s PNG lesson adds the practical range people meet in 8-bit files. Each pixel can sit between 0, fully transparent, and 255, fully opaque. GIF, by contrast, is only fully opaque or fully transparent. A soft edge needs the PNG-style range, and a JPEG has neither.
How do you make a picture transparent with a real alpha channel?
You edit the alpha sample, then save a format that stores it. These steps are the edit. They are not the converter.
- Confirm the file is a JPEG, or any picture whose pixels are all opaque.
- Choose the pixels that should show whatever sits behind the image.
- In an editor that writes alpha, set those pixels to an alpha of zero, or to a value between zero and the maximum if the edge should be soft.
- Export as PNG so the alpha sample is stored. Do not export as JPEG.
- Open the PNG on a colored or checkerboard background and look through the hole.
- If the only step you took was a JPG to PNG conversion, go back to step 3. The converter did not set any alpha to zero.
web.dev says PNG is a reasonable source file when you may need to edit again, and a poor default for a photograph you only need to display. A logo with a drop shadow is the example it gives for semi-transparency. A full photo of a room usually does not need every pixel in a lossless PNG.
The same steps are how to make a picture transparent when the file started as a photo. “Picture” and “image” are the same pixels. The format either stored an alpha sample or it did not.
How is CSS opacity different from a transparent pixel?
CSS opacity fades the element. It does not change the file. MDN’s opacity page says the property sets how much content behind an element is hidden.
A value of 0 makes the element fully transparent, meaning invisible. A value of 1, the default, is fully opaque. Values between them are translucent.
The important limit is in the next sentence on that page. Opacity applies to the element as a whole, including its contents. You cannot fade only the sky and leave the subject solid by setting opacity on the image. Every pixel on that element is faded together, and the JPEG or PNG bytes are unchanged.
| Goal | What to change | Format that can store it |
|---|---|---|
| A hole where the background was | Alpha sample of 0 on those pixels | PNG |
| A soft edge or shadow | Alpha between 0 and the maximum | PNG |
| The whole picture looks faint | CSS opacity between 0 and 1 | Any image, the file stays the same |
| A smaller photo with no hole | Lossy compression | JPEG |
| A format swap of an opaque photo | Re-encode only | PNG file, still opaque |
Use opacity for a hover fade or a temporary dimming. Use PNG alpha when the design needs a hole. MDN also warns that faded text still has to stay readable, and it points to a 4.5 to 1 contrast ratio for ordinary text. Fading a label with opacity can fail that test even when the color pair looked fine at full strength.
What should you check when the background is still there?
Look at the file type and the alpha sample before you blame the page. A white edge is often white pixels with a full alpha, not a transparent pixel drawn on a white page.
| What you see | Likely cause | What to do |
|---|---|---|
| Checkerboard never shows | The file is still JPEG, or a PNG from a format conversion | Set alpha to 0 in an editor, then export PNG |
| The whole image looks faint | CSS opacity is below 1 | Remove the opacity if you wanted a hole instead of a fade |
| A white fringe around the subject | Those pixels are solid white, not alpha 0 | Select the fringe and set its alpha to 0, or rebuild the edge |
| The PNG is huge | A photo was saved with lossless PNG | Keep PNG only where you need alpha. Use JPEG for opaque photos |
| GIF edges look harsh | GIF transparency is on or off, not partial | Use PNG if the edge needs values between 0 and fully opaque |
If the preview in the converter looks identical to the JPEG, that is the expected result. The tool did its job, which is a format change. Transparency starts when an alpha sample is written, and the PNG specification is the definition of that sample.
Frequently asked questions
Will converting JPG to PNG make the background disappear?
No. The converter decodes the JPEG and re-encodes those pixels as PNG. JPEG has no alpha channel, so there is no transparency to keep. The new file is a PNG, and PNG is allowed to store alpha, but this conversion does not paint any pixel's alpha down to zero. You still need an editor that writes a real alpha sample for the pixels you want to see through.
How do you make a picture transparent if it is already a PNG?
Open it in an editor that can change the alpha sample, and set the unwanted pixels to fully transparent. The PNG specification says an alpha of zero means fully transparent and the maximum value means fully opaque. Saving again as PNG keeps that sample. If the file is a JPEG, do the same edit first, then save as PNG. A format swap alone still leaves the picture solid.
Is a faded picture the same as a transparent background?
No. The CSS opacity property sets the opacity of the whole element. A value of 0 makes the element and its contents invisible, and 1 leaves them fully opaque. The pixels in the file do not gain a hole. Use opacity when you want the entire image to look faint. Use an alpha channel in a PNG when only some pixels should show what is behind them.
Which format should a logo with soft edges use?
Use a format with real alpha if the edge is partly see-through. web.dev describes PNG alpha as a level from 0, fully transparent, to 255, fully opaque, and gives a logo with a drop shadow as the case for semi-transparency. JPEG cannot store that partial edge. A vector SVG is a separate choice when the mark is shapes rather than a photo.
Why is the PNG so much larger than the JPG?
PNG compression is lossless, so it keeps the pixel data instead of throwing detail away. web.dev says that transfer size makes PNG a poor default for photographs, and Adobe describes JPEG as the lossy option that removes some image data. Keep PNG when you need the alpha channel or sharp edges. Do not convert a whole photo to PNG just to chase a transparent background the converter cannot create.
Sources
- Image file type and format guide · MDN, 2026
- Portable Network Graphics (PNG) Specification · W3C, 2026
- Image formats: PNG · web.dev, 2026
- opacity · MDN, 2026
- Understand raster and vector files · Adobe, 2026