Convert an Image Between Formats
Change the container, and understand the quality and transparency consequences before you do.
Which format, for what
| Format | Best for | Watch out for |
|---|---|---|
| JPEG | Photographs; maximum compatibility | No transparency; lossy on every save |
| PNG | Screenshots, diagrams, logos, anything with transparency | Huge for photographs — it is lossless |
| WebP | The default for websites today | Animation support is uneven in older editors |
| AVIF | Smallest files on sites you control | Slow to encode; poorly supported in older desktop software |
| GIF | Short animations, nostalgia | 256 colours, no alpha blending, inefficient |
| BMP | Legacy Windows tooling and raw buffers | Uncompressed and enormous |
| SVG | Icons, logos, line art at any size | Not a raster format — converting it to pixels fixes a resolution |
| HEIC | Photos from newer iPhones | Patented and unevenly supported outside Apple's ecosystem |
The transparency rule that decides half of all conversions
JPEG has no alpha channel. Converting a PNG with a transparent background to JPEG forces a choice: the transparent areas must become some colour. Most encoders paint them black, which produces a logo with a black box behind it and confuses people who expected white. If you need transparency, the only lossy-capable candidates are WebP and AVIF; otherwise stay in PNG.
The text and screenshot rule that decides the other half
JPEG compression works on 8 × 8 pixel blocks and is tuned for gradual, photographic variation. Sharp black text on white is the worst possible input: those blocks contain extreme high-frequency detail, and the artefacts appear as coloured fringing and blocky edges around every letter. For screenshots, slides and diagrams, PNG is smaller and sharper — or WebP lossless, which is often a third smaller again than PNG with identical pixels.
Converting a vector to a raster is one-way
An SVG resized to 512 × 512 pixels becomes a bitmap forever. If the source might need to be printed or displayed at a larger size later, keep the SVG and render derivative bitmaps only for the specific places that need one. The reverse conversion — tracing a bitmap into an SVG — is a different operation that guesses at geometry and is never a faithful round-trip.
Quality settings do survive the conversion
- Converting JPEG to WebP is a generation of loss: the JPEG artefacts are baked in and the WebP encoder compresses them again. Convert from the original if you still have it.
- PNG to JPEG is lossy and irreversible, and transparency is flattened.
- WebP or AVIF to PNG is lossless in terms of pixels, but the file will be substantially larger.
- Converting to a format the browser cannot write natively — such as HEIC — is not offered here, and no claim is made that it works.
How to use it
- Drop one or more images.
- Choose the target format.
- Set the quality if the target format is lossy.
- Convert, then verify transparency and edges before shipping.
Worth knowing
- JPEG supports no alpha channel, so transparency must be flattened.
- PNG is lossless, which is why it beats JPEG on screenshots but loses badly on photographs.
- WebP and AVIF both support transparency and animation.
- Format support depends on the codecs your browser exposes.
Limitations
- HEIC, BMP, GIF and SVG can be read but not written by a browser canvas.
- Animation is not preserved — an animated GIF becomes a single frame.
- Metadata is discarded by the canvas round-trip.
- Converting between lossy formats compounds artefacts.