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.

Input

1–100. Applies to JPEG and WebP only; PNG is lossless.

Common settings

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

Runs entirely in your browser — the image is never uploaded.
Original dimensions preserved; nothing is resized or cropped.
Old and new file sizes shown side by side with the percentage change.
Warns you when a conversion drops transparency, or when your browser has no encoder for the format you asked for.

How to convert an image

1

Select an image file — PNG, JPEG, WebP and GIF all decode.

2

Choose the output format you want.

3

For JPEG or WebP, set the quality; 80–90 is the usual sweet spot.

4

Run the tool, check the size comparison, then download the result.

Common mistakes

Converting a transparent PNG logo to JPEG: JPEG has no alpha channel, so the transparent area is filled with the background colour you chose — white by default.
Pushing JPEG quality to 100: the file grows sharply while the visible gain over 90 is close to nothing.
Re-saving a JPEG as JPEG to shrink it: the losses of the first encode are already baked in, and a second pass adds new ones without recovering anything.

Examples

A 1.4 MB photo saved as WebP at quality 85 → typically around 400 KB, with no visible difference at normal viewing size
A transparent PNG icon converted to JPEG → the same icon on a solid white square, because JPEG cannot store transparency
A screenshot of flat UI colours saved as PNG rather than JPEG → smaller and sharper, since PNG is lossless and does not blur hard edges

See also

  • Image ResizerNeed different dimensions as well as a different format? Resize it first.
  • Base64 Image EncoderInlining 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.