ximg.es

Convert images to WebP and AVIF

Drag your images in, choose the format and quality, and download them converted. Everything happens in your browser: the images aren’t uploaded anywhere.

80

Images are processed on your device and never leave it.

    WebP, AVIF, JPG or PNG: which to choose

    What quality to use

    Between 75 and 85 is the sweet spot for photos on the web: above that, the file grows a lot and the difference is barely visible. With AVIF you can go lower, down to 60 or 65, with a similar result. Watch the savings percentage and compare the thumbnails: if an image comes out larger than the original, it was already well compressed.

    Reducing the size saves even more than the quality. A phone photo is 4000 pixels wide; for a website, 1600 or 2000 is usually plenty. Enter a width in “Maximum width” and larger images are scaled down keeping their ratio.

    Nothing is uploaded

    Most online converters upload your images to their server. This one doesn’t: your browser does the conversion with the canvas API, and the files never leave your device. Once the page has loaded it even works offline. The trade-off is that the result depends on your browser’s encoder, and EXIF metadata (date, camera, location) is lost, which on a website is usually an advantage.

    Serving several formats

    To give AVIF to browsers that support it and a JPG to the rest, use <picture>. Images from the ximg.es generator can be requested in any of those formats by changing the extension, which is handy for testing the markup before you have the real images:

    <picture>
      <source srcset="https://ximg.es/1200x800.avif" type="image/avif">
      <source srcset="https://ximg.es/1200x800.webp" type="image/webp">
      <img src="https://ximg.es/1200x800.jpg" width="1200" height="800" alt="">
    </picture>

    Frequently asked questions

    Are my images uploaded to a server?

    No. Your browser does the conversion and the files never leave your device. You can check by going offline after the page loads: it keeps working.

    How do I convert a JPG to WebP?

    Drag the JPG onto the tool, leave “WebP” in “Convert to” and click “Download”. At quality 80 it’s usually about a third smaller with no visible difference.

    Why can’t I choose AVIF?

    Because your browser can display AVIF but not create it. Recent Chrome, Edge and Firefox can; Safari, for now, can’t. WebP saves a bit less, but everyone can open it.

    Is quality lost when converting?

    With WebP, AVIF and JPG, some: they are lossy formats, and the quality slider decides how much. PNG loses nothing, but the file is usually much larger.

    Why is the converted image larger than the original?

    It happens when the original was already heavily compressed, or when converting to PNG. Lower the quality, reduce the width or keep the original.

    Is EXIF data kept?

    No. Converting with canvas strips the metadata, including the GPS location of phone photos. Orientation is respected: the photo comes out rotated as you see it.

    More tools

    See all tools · Placeholder image generator