Image Format Converter
Convert an image between PNG, JPEG and WebP without uploading it. The dimensions stay the same, the size change is reported, and the file never leaves your device.
Pick an image, choose PNG, JPEG or WebP, and the file is re-encoded inside your browser tab — the bytes never travel to a server. The pixel dimensions are left exactly as they were; only the container and the compression change. You get the new file size next to the old one, so you can see whether the switch was worth making, plus a warning when a conversion loses something, such as the transparency that JPEG cannot carry.
What this converter does
It decodes your image, redraws it onto a canvas at its original size, and asks the browser to encode that canvas as the format you picked. PNG is lossless and keeps transparency. JPEG is lossy, has no alpha channel, and is usually smallest for photographs. WebP can be either, and typically lands 25–35% below a comparable JPEG. Because the work happens in the page, nothing is uploaded: no queue, no watermark, and no size cap beyond what your own device can hold in memory.
How the format converter works
The file is read as a data URL, decoded by the browser's own image pipeline, and redrawn onto a canvas at its natural size. Calling toDataURL with the target MIME type then asks the browser's encoder for the new file — for JPEG and WebP the quality argument is passed through, while PNG ignores it because it is lossless. Two details are handled explicitly rather than left to chance: a target of JPEG has no alpha channel, so any transparency is composited onto the background colour before encoding, and the returned data URL is re-read to confirm the format, since the specification lets a browser fall back to PNG silently when it has no encoder for what you asked for.
Features
How to convert an image
Select an image file — PNG, JPEG, WebP and GIF all decode.
Choose the output format you want.
For JPEG or WebP, set the quality; 80–90 is the usual sweet spot.
Run the tool, check the size comparison, then download the result.
Common mistakes
Examples
See also
- Image Resizer — Need different dimensions as well as a different format? Resize it first.
- Base64 Image Encoder — Inlining a small icon in CSS? Turn the converted file into a data URI.
FAQ
Are my images uploaded anywhere?
No. The file is read by your browser, drawn onto a canvas and re-encoded in the page itself. Nothing is sent over the network, which is also why the tool keeps working if you go offline after the page has loaded.
Which format should I pick?
For photographs, WebP first and JPEG as the fallback — both are lossy and both handle smooth gradients well. For logos, icons, screenshots and anything with sharp edges or transparency, choose PNG: it is lossless and keeps the alpha channel. WebP can also be lossless, but PNG remains the safest bet for wide compatibility.
Why did my file get bigger instead of smaller?
Usually because you converted a lossy image into a lossless one. A JPEG photo saved as PNG has to store every pixel exactly, compression artefacts included, so it commonly grows several times over. The savings run the other way: a PNG photograph turned into JPEG or WebP.
The output says PNG even though I asked for WebP. Why?
Canvas encoding is specified to fall back to PNG when the browser has no encoder for the requested type, and it does so without raising an error. This tool checks what actually came back and tells you when that happened, rather than handing you a PNG named .webp.