How to use
- Drop an image. The tool tells you whether it contains any transparent pixels.
- Pick the target format.
- For JPG, choose the background colour that transparent areas will sit on. For PNG and WebP you can keep transparency or flatten it.
- Adjust quality for JPG and WebP, compare with the slider, and download.
How it works
The file is decoded by the browser, drawn onto a canvas and re-encoded with canvas.toBlob. Transparency is checked by scanning the alpha byte of every pixel; a single value below 255 means the image has transparent or semi-transparent areas.
JPG cannot store an alpha channel. Before encoding, the canvas is filled with your background colour and the image is composited on top, which for each channel computes out = src × α + background × (1 − α). Without this step browsers turn transparent pixels black.
PNG is lossless, so the quality slider is hidden for it. WebP supports both transparency and lossy compression.
Worked example
A 50%-transparent red pixel (255, 0, 0, α = 0.5) converted to JPG on white becomes 255 × 0.5 + 255 × 0.5 = 255 red, and 0 × 0.5 + 255 × 0.5 ≈ 128 for green and blue: a pink of (255, 128, 128). On a black background the same pixel becomes (128, 0, 0).
Limitations
- Only the first frame of animated GIF or WebP files is converted.
- Output is 8-bit sRGB; 16-bit PNGs and wide-gamut images are reduced.
- HEIC/HEIF input works only in browsers that can decode it natively (mainly Safari).
- Converting a JPG to PNG does not restore detail lost to the original compression; it only makes the file larger.
FAQ
Should I convert PNG photos to JPG or WebP?
Usually yes. Photographs saved as PNG are often five to ten times larger than a high-quality JPG or WebP that looks the same. Keep PNG for screenshots, line art and graphics with sharp edges.
Why did my transparent logo get a white box?
You converted to JPG, which has no transparency. Choose WebP or PNG to keep the transparent background, or pick a background colour that matches where the logo will appear.
Is WebP supported everywhere?
All current major browsers display WebP. Some older desktop software and certain upload forms still reject it; JPG remains the safest choice for those.
Is metadata copied to the new file?
No. Re-encoding through a canvas writes pixels only, so EXIF data, including GPS location, is dropped.