How to convert an image to AVIF
AVIF is the newest mainstream image format on the web and, for photographs, the one that reaches the smallest files at a given visual quality. It is based on the AV1 video codec and supports transparency, wide colour and high bit depth. Converting an image to AVIF is what you do when you are squeezing every kilobyte out of a site, a gallery or an app, and you can accept that the format is newer and slower to produce than JPG or WebP.
Use this page when you have JPG, PNG, WebP, HEIC or similar images and want AVIF versions. You pick one Quality value, convert a batch, compare before and after, and download the results. Pixel dimensions are not changed; only the encoding is.
The encoding is done by libavif compiled to WebAssembly and bundled with this site, not by a server. The first time you convert, your browser loads that engine (a file of about 3.5 MB) from this same site and keeps it in cache, so later visits start faster. Your pictures are not uploaded, there is no account and no watermark, and it runs in one thread, so it needs no special browser features. AVIF encoding is heavy: expect seconds, not milliseconds, for a large photo.
Steps to convert JPG or PNG to AVIF
- Click Add files, drag your images anywhere on the page or paste one with Ctrl+V. JPG, PNG, WebP, HEIC and other common raster images are accepted. A sample is loaded first.
- Set Quality. The default is 60, which is lower than the default for JPG or WebP because AVIF keeps the look at lower values. Try 50 to 65 for photographs; go higher only if you see banding in skies or skin.
- Click Convert to AVIF. Each file shows a progress indicator, and conversion of a big picture can take a few seconds. A file that fails is flagged without stopping the others.
- Use Compare before and after to see the size drop and look closely at gradients, which is where AVIF shows its limits first when pushed too low.
- Click Download, or Download all as ZIP for a batch.
landscape.jpgbecomeslandscape.avif.
Examples
Hero photo for a landing page
hero.jpg, 2400 × 1350, quality 60. The AVIF keeps the 2400 × 1350 pixels and is usually much lighter than the JPG for photographs. Check the comparison panel for the real figure.
Transparent product image
bottle.png, 1000 × 1000 with transparency. AVIF keeps the alpha channel, so you can use it where you would use a transparent PNG, with a much smaller file.
HEIC photos from a phone, straight to AVIF
IMG_5120.heic, 4032 × 3024. HEIC is read first and the result is written as AVIF, so you skip the intermediate JPG. Remember that the AVIF file will not open in every gallery app.
Quality too low
sunset.jpg converted at quality 30 shows visible banding in the sky and smoothed texture. Raise to 55 to 65 and compare again. If the sky still bands, a quality around 70 normally fixes it.
Common errors and how to fix them
- It takes a long time: AVIF encoding is slow by nature, and large photos on a phone are the slowest case. Convert fewer files at once, or resize the picture first with Resize image.
- "The browser ran out of memory": the encoder works on all the pixels at once. Close other tabs, convert one file at a time, or reduce the dimensions.
- "The AVIF encoder failed on this picture.": a rare case with unusual input. Convert the picture to JPG or PNG with Convert images first and try again.
- The result will not open in an app: not every program reads AVIF yet. Keep a JPG or WebP version for email, office documents and older software.
- The sky or skin looks blocky: raise the quality; flat gradients are the hardest case for any lossy format.
AVIF, WebP or JPG
Is AVIF better than WebP?
For photographs, AVIF usually produces smaller files at similar visual quality, and it handles gradients and wide colour well. WebP encodes much faster and is supported in slightly older browsers. The choice is size against speed and reach.
Which browsers display AVIF?
Chrome from version 85, Firefox from 93 and Safari from 16, along with browsers based on them. Older versions do not, so serve a WebP or JPG fallback to be safe.
Is AVIF lossless?
It can be, as a format, but this tool writes lossy AVIF controlled by the quality slider. Keep the original if you need exact pixels.
Why is the default quality 60 and not 85?
Quality scales are not comparable between formats. An AVIF at 60 is typically similar in look to a JPG at a considerably higher number, which is why the file ends up so small. Judge by the comparison, not by the number.
Should I use AVIF for email or social media?
No. Many mail clients and platforms do not accept it. Use it for websites and apps where you control the display, and use JPG for sharing.
Are my images uploaded?
No. The encoder runs in your browser; the only download is the engine file from this site, once.
What else can I do with the result?
Compare against JPG to WebP for a faster, widely supported alternative, or reduce the dimensions with Resize image.