Image format converter
Convert images to PNG, JPEG or WebP right in your browser: tune JPEG/WebP quality, compare output size per file, and batch convert several images at once.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Everything runs locally in your browser — images are never uploaded
Hit “Convert” and the output name, dimensions and size comparison of every file show up here.
What this tool does
- Convert PNG to JPEG or WebP to cut file size: drop the file in, pick the format, tune quality and read the output name, dimensions and the "smaller by / larger by" percentage.
- Normalise a mixed batch of assets — screenshots, exports, phone photos — into one format before uploading them to a CMS or CDN.
- Catch transparency problems early: when an image has transparent pixels and JPEG is selected, the tool warns that those areas will be filled with white.
- Measure what WebP actually saves: convert the same image to PNG, JPEG and WebP and compare the output byte counts before committing.
Example
Input
photo.png (1000 bytes) converted to JPEG, producing 375 bytes
Output
photo.png → photo.jpg 1920 × 1080 · 1.0 KB → 375 B (-62.5%)
The size comparison line and the -62.5% figure come from the pure logic layer: formatBytes converts in decimal units and compareSizes computes (output − original) / original. The real decoding and encoding use the browser canvas and cannot be verified offline, so the example shows the deterministic naming and size math.
Frequently asked questions
Does the quality slider affect PNG?
No. PNG is lossless, so the canvas quality parameter has no effect on it — the slider only applies to JPEG and WebP. To shrink a PNG, try converting to WebP instead: it also supports transparency and is usually much smaller.
Why did my transparent background turn white after converting to JPEG?
Because JPEG has no alpha channel, so the browser can only paint transparent areas white. Choose PNG or WebP to keep transparency. If the target platform only accepts JPEG, accept the white background or make the background a solid color in the source image first.
Why did the converted file get bigger?
Three common causes: converting an already-small JPEG back to lossless PNG; converting a high-quality WebP to low-quality JPEG when the content is photographic; or source content like a screenshot with large flat areas, which PNG compresses better. The tool labels this "larger by xx%" so you can switch format or quality and retry.
Do the dimensions change?
No. Conversion only changes the encoding, so the pixel dimensions match the original (the output size is shown for confirmation). Use the image resizer when you need different dimensions — downscaling first also produces smaller files.
Are my images uploaded?
No. Files are read locally through the File API, decoded with createImageBitmap and encoded with canvas.toBlob, all in browser memory. There is no upload endpoint.
Keywords:图片格式转换png 转 jpgwebp 转换image converter图片压缩jpeg qualitybatch convertcanvas透明通道