How to keep a transparent background when you compress or convert an image
4 minutes, updated 2026-11-09
A logo or product cut-out sits on a checkerboard in the editor. After compressing or converting it, it suddenly has a white box around it. The image did not change; the format it was saved in cannot store transparency.
Which formats keep it
| Format | Transparency | Notes |
|---|---|---|
| PNG | Yes, full alpha | Lossless; large for photos, small for flat graphics |
| WebP | Yes, full alpha | Much smaller than PNG; read by every current browser |
| AVIF | Yes, full alpha | Smallest; slower to create, newer browsers only |
| GIF | On or off only | Hard, jagged edges; 256 colours |
| JPG | No | Transparent areas are filled with a solid colour |
Why it turns white (or black)
JPG has no alpha channel, so every converter has to paint the transparent pixels some colour. This site fills them with white by default, and the convert tool lets you choose another colour to match the page the image will sit on. Some other tools fill with black, which is why a logo can suddenly appear in a dark square.
Settings that keep it transparent
- Compress tool: leave the format on 'Auto (keep format)'. A PNG stays PNG and is reduced to a palette that keeps the transparency, usually 60 to 80% smaller.
- Convert tool: choose WebP or AVIF for the smallest transparent file, PNG for maximum compatibility.
- Fit to a KB size: 'Auto' saves JPG for anything but WebP and AVIF, which removes transparency. Choose PNG, WebP or AVIF in the format menu instead.
- Resize tool: choose the same format as the source, or WebP.
Edges
Soft edges, such as hair or a drop shadow, use partly transparent pixels. PNG, WebP and AVIF keep them; a GIF or a heavily reduced palette can leave a pale fringe against dark backgrounds. If the edge looks rough after compressing, raise the quality or the palette size one step.