Toolerax logoToolerax
·7 min read

How to Convert an Image to AVIF

How to Convert an Image to AVIF

Images are usually the heaviest thing on a web page, and page weight is one of the few performance problems you can fix without touching your code. Converting your images to AVIF is the single biggest win available: the same picture, visually the same, at a fraction of the bytes. This guide explains when AVIF is the right call, when it is not, and how to serve it without breaking anything.

What is AVIF?

AVIF (AV1 Image File Format) is a modern image format derived from the AV1 video codec. It supports lossy and lossless compression, transparency, animation and wide colour — but the headline is efficiency. For typical photographs an AVIF is often 30-50% smaller than a JPG of comparable quality, and meaningfully smaller than WebP too.

Smaller images mean less to download, which means a faster Largest Contentful Paint — usually the Core Web Vital that a media-heavy page fails on. If your hero image is a 400 KB JPG, getting it to 150 KB without a visible change is real, measurable speed.

AVIF vs WebP vs JPG — which one when

  • AVIF — best compression, supported by every current browser. Use it as your primary delivery format for photos and rich graphics.
  • WebP — slightly larger files than AVIF, but a longer support history in older software. A sensible middle fallback.
  • JPG / PNG — the universal floor. Keep one as the final fallback and for anything that leaves your website.

Note that this ranking is about delivering images on the web. It is not about storing, editing or sending them — see the caveats below.

Convert your image to AVIF, step by step

  1. Open the converter. Go to the Image to AVIF tool and drop in your PNG or JPG.
  2. Convert. The image is re-encoded as AVIF on the server.
  3. Download the .avif file and compare its size against the original — that difference is what your visitors stop downloading.

Start from the highest-quality source you have. Converting an already-compressed, already- resized JPG works, but you are stacking one lossy encode on another; going straight from the original export gives a cleaner result at a smaller size.

Resize before you convert

The most common mistake is converting a 4000 px camera image and serving it into a 800 px slot. No format can compensate for that. Resize to roughly the largest size the image will actually be displayed at — with the image resizer — and then convert. Right size first, right format second. That order is where the real savings come from.

How to serve AVIF safely

Do not simply swap your src to an AVIF file and hope. Use the picture element so the browser picks the best format it understands and falls back on its own:

<picture>
  <source srcset="hero.avif" type="image/avif">
  <source srcset="hero.webp" type="image/webp">
  <img src="hero.jpg" alt="Description" width="1200" height="800">
</picture>

The browser reads the sources in order and takes the first type it supports, so a modern browser gets AVIF and everything else quietly gets the JPG. Always keep the img tag as the last child — it carries the alt text and the dimensions that prevent layout shift.

If your site runs on a framework with a built-in image component, or a CDN with automatic format negotiation, this is usually handled for you — check before you build a manual pipeline you do not need.

When not to use AVIF

AVIF is a delivery format, not an interchange format. Avoid it when the file leaves your control:

  • Emailing or messaging a picture. Many mail clients and desktop viewers still cannot open AVIF. Send JPG.
  • Uploading to someone else’s site or a print shop. Upload forms frequently reject unknown extensions.
  • Working files and archives. Keep your masters in a lossless format; AVIF is the output, not the original.
  • Tiny flat graphics. For a small icon or a simple logo, PNG or SVG can be smaller and sharper than any photographic codec.

If you have been handed an AVIF and need something ordinary software will open, go the other way with AVIF to JPG or, when transparency matters, AVIF to PNG.

Does AVIF keep transparency and animation?

Yes to both. A transparent PNG converts to an AVIF with its alpha channel intact, which makes it a strong replacement for heavy transparent PNGs — often the worst offenders on a page. AVIF also supports animation, so it can stand in for a GIF at a dramatically smaller size.

Is it private and free?

AVIF encoding needs proper image software, so this tool runs on our secure server rather than in your browser. Your file travels over an encrypted HTTPS connection, is converted in an isolated workspace, and is deleted automatically the moment the AVIF is sent back — nothing is stored, logged or shared. It is completely free, with no watermark and no sign-up.

Frequently asked questions

Do all browsers support AVIF? Every current major browser does. Very old versions do not, which is precisely what the picture fallback above is for.

Is AVIF better than WebP? For file size, generally yes. WebP still has the edge in support among older non-browser software, so many sites offer both.

Will I lose quality? AVIF is lossy by default, but at normal settings the difference is invisible at viewing size while the file is far smaller. Photographs handle it best; hard-edged graphics and text are more sensitive.

Can I still compress it further? If a converted file is still larger than you want, the answer is almost always to reduce the pixel dimensions rather than crush the quality — try the resizer or the image compressor.

Convert your image now

Open the Image to AVIF converter and cut your image weight in seconds — free, watermark-free and deleted right after. Need to go back the other way? Use AVIF to JPG.

Written by the Toolerax Team

We are the developers who design, build and test every one of the 100+ free tools on Toolerax. Each guide is written alongside the tool it explains and checked against how the tool actually works. About us

Tools mentioned in this article