Image Converter
Convert images between PNG, JPG and WebP locally in your browser: adjustable quality for lossy formats, transparency filled when converting to JPG, instant download.
Phones shoot HEIC, downloads arrive as WebP, and the moment another program refuses to open one of them a conversion is needed. This tool converts between PNG, JPG and WebP in the browser: quality is adjustable when the target is lossy, the result downloads in one click, and the image is never uploaded to a server.
Two things about the formats. JPG cannot carry transparency, so converting a PNG to JPG fills the transparent areas with a background colour. And the quality setting applies only to JPG and WebP — around 90 is the balance point between fidelity and weight — while PNG is lossless and unaffected. Canvas re-encoding also drops the EXIF capture data, which for anyone wanting to shed location information is a bonus rather than a cost.
Did this tool solve your problem?
Submitting sends the tool name, your input and the current result to the server. Please do not include ID numbers, phone numbers or other private data.
AI assistant It answers using your current input and result
Asking again sends your current input and result to the server once more. Please do not include private data.
How to use
- Load the image to convert.
- Choose the output format: PNG, JPG or WebP.
- Set the quality for lossy formats; about 90 is a good balance.
- Check what happens to transparency when converting to JPG, then download.
How it works
Convert in three steps
Press "choose image" or switch to the built-in demo, pick the target format and press convert — the result area shows source info and converted size (in canvas-capable browsers); download to save.
JPG and transparency
JPG has no alpha channel: converting PNG to JPG fills transparent areas with the background color. To keep transparency, target PNG or WebP.
How quality applies
Quality affects only lossy formats like JPG and WebP; PNG is lossless and ignores it. When converting to JPG/WebP, around 90 balances quality and size.
Lossless vs. lossy conversions
Lossless round trips (e.g. PNG to WebP in lossless mode) keep pixels identical; lossy targets incur slight loss that's normally invisible — keep the original for quality-critical work.
Code example
JavaScript Converting means changing the toBlob MIME
// no separate decode path: decode once, re-encode into the target MIME
async function convert(file, mime) {
const img = await createImageBitmap(file);
const canvas = document.createElement('canvas');
canvas.width = img.width;
canvas.height = img.height;
canvas.getContext('2d').drawImage(img, 0, 0);
// transparent to JPG turns black: lay down a white background first (PNG/WebP need none)
if (mime === 'image/jpeg') {
const ctx = canvas.getContext('2d');
ctx.globalCompositeOperation = 'destination-over';
ctx.fillStyle = '#ffffff';
ctx.fillRect(0, 0, canvas.width, canvas.height);
}
return new Promise((resolve) => canvas.toBlob(resolve, mime, 0.9));
}
const webp = await convert(fileInput.files[0], 'image/webp');
Shell One-liners with ImageMagick
# basic conversion (target format inferred from the extension)
magick photo.png photo.webp
# set quality and background together (PNG transparency to JPG needs a white backing)
magick photo.png -background white -alpha remove -quality 90 photo.jpg
# batch-convert every PNG in a directory to WebP
for f in *.png; do magick "$f" "${f%.png}.webp"; done
FAQ
Where did the transparent background go after PNG-to-JPG?
JPG doesn't support alpha, so transparency fills with the background color at conversion. To keep it, choose PNG or WebP as the target.
Are images uploaded during conversion?
No. Decode, re-encode and download all happen on your machine in the browser — the page doesn't even need a connection (beyond loading itself).
WebP won't open on an older device — what do I do?
Convert it to JPG, which nearly every image environment accepts — WeChat, gallery apps and printers all read JPG.
Can iPhone HEIC photos convert directly?
Depends on whether the browser ships a HEIC decoder — most desktop browsers don't yet. Export to JPG from the system gallery first, then convert here.
Does an animated GIF stay animated after converting to PNG?
No. PNG, JPG and WebP static outputs keep only the first frame. Keep GIF to preserve animation, or use a dedicated video tool.
What happens when quality drops?
Files shrink, but below about 40 blocky artifacts and color banding appear. For everyday sharing 60-80 suffices; for archiving or re-editing use 90+ or PNG.
Does conversion reset the photo's capture info?
Yes. Canvas re-encoding keeps only pixels — EXIF capture time, GPS and other metadata don't carry into the new file, a side benefit for anyone wanting location data scrubbed along the way.