Skip to main content

Convert and compress an image

Change an image between PNG, JPEG, and WebP formats, adjust output quality when needed, and download the generated file directly from your browser.

  • Export
Automate

Embed this widget

Customize the result, check the live preview, then copy the code.

Preview

Embed code type

Code to copy

Responsive and automatically resized by Bethemesh.

Image
No image loaded

Drop an image here

Add a PNG, JPEG, or WebP image. The file stays on your device and all edits run locally in your browser.

Need more editing options?

Use multiple editing tools in one workspace, with your open file and its current edits.

Open the full editor

Was this tool useful?

How does this tool work?

Every image format has its strengths: PNG for screenshots and transparency, JPEG for photos that open everywhere, WebP and AVIF for lighter web files, BMP and GIF for older software. This converter turns a PNG, JPEG or WebP image into any of these six formats and shows the resulting size before you download, without sending the file online.

Import the image, then choose the Output format: Keep current format, PNG, JPEG, WebP, AVIF, BMP or GIF. The Estimated size comes from actually encoding the image in the chosen format, with the change in percent compared with the original file, and the Dimensions stay those of the image.

PNG is lossless; JPEG and WebP are encoded by the browser at 90% quality. JPEG has no transparency: transparent areas turn white and a warning says so. AVIF, BMP and GIF go through FFmpeg compiled to WebAssembly, downloaded once on first use and then cached; GIF is limited to a 256-colour palette.

The downloaded file keeps the original name followed by -edited and the new extension. Conversion re-encodes the pixels, so EXIF metadata (camera, date, GPS position) is not copied.

How to use this tool

  1. Import the image

    Drop a PNG, JPEG or WebP file of up to 25 MB.

  2. Choose the format

    Click PNG, JPEG, WebP, AVIF, BMP or GIF and read the estimated size.

  3. Download the converted file

    Click Download image to save the new version.

Output size and quality

The estimated size comes from a real encoding; for AVIF, quality is translated into the AV1 codec's CRF factor.

Size change shown

Δ = T_export ÷ T_source − 1

Negative when the converted file is lighter.

AVIF quality

CRF = round(55 − 40 q)

With q = 0.9, CRF = 19; a lower CRF means better quality and a larger file.

T_export, T_source
size of the converted file and of the original file
q
quality from 0.2 to 1 (0.9 in this tool)
CRF
constant rate factor of the AV1 codec

Use cases

Open a WebP image anywhere

Convert a WebP image saved from a website to PNG or JPEG for software that cannot read it.

Lighten a website's images

Turn JPEG photos into WebP or AVIF and compare the estimated size before choosing.

Meet a format requirement

Provide the JPEG a form demands or the BMP an old program asks for.

Examples

Transparent PNG logo converted to JPEG

JPEG has no alpha channel, so transparency is filled with white (#FFFFFF). Keep PNG or WebP if the logo must sit on a coloured background.

Input

logo.png with a transparent background, output format JPEG

Result

logo-edited.jpg on a white background

Photo converted to AVIF

CRF = round(55 − 40 × 0.9) = 19: the lower the CRF, the better the quality. The estimated size lets you compare with WebP before downloading.

Input

photo.jpg, output format AVIF, 90% quality

Result

photo-edited.avif encoded with the AV1 codec at CRF 19

Tips and best practices

  • For a web photo, compare the estimated size in WebP and AVIF: AVIF is often lighter but slower to encode.
  • Do not convert a JPEG photo to PNG to gain quality: the JPEG loss has already happened and the PNG will be much heavier.
  • Keep PNG for screenshots with text: JPEG compression creates halos around letters.
  • To set the quality or aim for a specific size, use the image optimizer instead.

Sources and references

Frequently asked questions

Which formats can I produce?

PNG, JPEG, WebP, AVIF, BMP and GIF, or the original format. Imported images must be PNG, JPEG or WebP.

Why does the estimated size sometimes go up?

A lossless format such as PNG or BMP stores every pixel: converting a JPEG photo to PNG often produces a file several times larger.

Why is a connection needed for AVIF, BMP or GIF?

These formats use the FFmpeg module, downloaded on first use from a CDN. Your images themselves are never sent.

Is transparency kept?

Yes in PNG and WebP; GIF only keeps on-or-off transparency; JPEG, BMP and AVIF replace it with white.

Can I set the compression quality?

This tool encodes JPEG and WebP at 90%. To choose the quality or a target size, use the image optimizer.

Is my image uploaded to a server?

No. Decoding and encoding happen in your browser.

Related tools

Tools similar or complementary to this one.

Works well with

Resize an image by setting its exact width and height before downloading the result.

Images & graphicsFeaturedUse this tool

Lighten an image by setting its quality or aiming for a size in KB, with the final size shown before download.

Images & graphicsFeaturedUse this tool