Skip to content
TrueScalers

Convert image formats

Converting an image format changes how its pixels are encoded. WebP produces files roughly 25 to 35% smaller than JPEG at equivalent quality and, unlike JPEG, supports transparency. Converting a transparent PNG to JPEG fills transparent areas with white, because the JPEG format has no alpha channel to store them in.

Loading tool…

How to convert an image format

  1. 01

    Add your images

    Drag one or many images onto the drop zone. JPG, PNG, WebP, GIF and BMP sources are all accepted.

  2. 02

    Choose the target format

    Pick WebP for the smallest files, JPEG for maximum compatibility, or PNG when lossless quality or transparency is required.

  3. 03

    Convert the batch

    Press Process. Every image is decoded and re-encoded by the browser, with the before-and-after size shown for each.

  4. 04

    Download the results

    Download files individually or all at once. No image was uploaded at any point in the process.

The formula

decode(source) → pixel buffer → encode(target, quality)
decode
Reading the source file into a raw pixel buffer using the browser image decoder.
pixel buffer
The uncompressed RGBA data, four bytes per pixel, that both formats are derived from.
encode
Writing the buffer back out in the target format at the chosen quality.
quality
The lossy quality factor, applied for JPEG and WebP and ignored for PNG, which is lossless.

Every conversion routes through an uncompressed pixel buffer, so converting JPEG to PNG does not recover detail the original JPEG discarded — it only stores the already-degraded pixels losslessly, usually in a much larger file. Converting between lossy formats compounds loss, so always convert from the highest-quality original available.

Worked example

Source
photo.jpg — 4032 × 3024 pixels, 2.4 MB
Convert to
WebP
Quality
85%
Result
photo-webp.webp — about 1.6 MB, 33% smaller

The JPEG is decoded to a 4032 × 3024 pixel buffer, which is 12.2 megapixels or roughly 48.8 MB uncompressed at 4 bytes per pixel. That buffer is re-encoded as WebP at quality 85, landing near 1.6 MB against the original 2.4 MB — a saving of 33% at visually equivalent quality. Converting the same buffer to PNG instead would produce a file of roughly 20 MB, because lossless coding cannot discard photographic detail.

Frequently asked questions

Which image format should be used on a website?

WebP is the default choice in 2026: it is 25 to 35% smaller than JPEG at equivalent quality, supports transparency and animation, and works in every browser released since 2020. Keep JPEG for maximum compatibility with older software, and PNG only for screenshots, logos and anything needing a genuinely lossless copy.

What is the difference between JPEG and PNG?

JPEG is lossy and designed for photographs, discarding fine detail the eye barely registers to achieve large size reductions. PNG is lossless and designed for graphics with flat colour and sharp edges, and it supports transparency. A photograph stored as PNG is typically five to ten times larger than the same image as JPEG.

Why did my PNG get a white background when converted to JPEG?

JPEG has no alpha channel, so transparency cannot be represented in the format at all. Transparent pixels must be composited against something, and white is the conventional choice. To keep a transparent background, convert to WebP or PNG instead — both carry an alpha channel.

Does converting JPEG to PNG improve quality?

No. Detail discarded by the original JPEG encoding is gone permanently, and PNG merely stores those already-degraded pixels without further loss. The result looks identical to the JPEG while occupying far more space. Converting to PNG is worthwhile only when a lossless working copy is needed for further editing.

Is WebP supported everywhere?

Yes, in practice. WebP is supported by Chrome, Edge, Firefox, Safari 14 and above, and every current mobile browser, which covers well over 95% of traffic. The remaining gaps are old desktop software and some email clients, so JPEG remains the safer choice for email attachments and files handed to unknown recipients.

What about AVIF and HEIC?

AVIF compresses better than WebP, often by a further 20%, but encoding is considerably slower and browser support arrived later. HEIC is the default on iPhones and is largely unsupported outside Apple platforms, which is why iPhone photos frequently need converting before sharing. This tool reads HEIC only where the browser itself can decode it.

Are files uploaded during conversion?

No. Each image is decoded and re-encoded using the browser's own built-in codecs, entirely inside this page. Nothing is transmitted, and this site has no server-side code that could receive a file. Converting a photograph of a passport or a private document is therefore no different from doing it in a desktop application.

Sources

Last reviewed: · Formula and sources verified by Syed Aqeel Ahmad Gillani. See the methodology for how every calculation is derived.