Convert PNG to AVIF
Drop in your PNGs and download AVIF files. Browsers cannot write AVIF themselves, so this page brings its own encoder, and your images never leave your device.
Converted files appear here.
How to use it#
- Drop your PNG files onto the box above, or click it to pick them.
- Leave Compression on Lossy and move the quality slider until the size in each row looks right, or choose Lossless to keep every pixel. Each change encodes the files again, which takes a moment for a large image.
- Download the results one at a time, or take the whole batch.
What you save#
AVIF compresses harder than WebP or JPG for the same look, and on the kind of image people keep as PNG the difference is large. In testing at the starting 60%, a 2400 by 1260 graphic with text went from 283 KB to 33 KB, an app icon on a transparent background from 160 KB to 47 KB, and a detailed 1600 pixel illustration from 3.0 MB to 34 KB.
The number in each row is measured on the file this page has just written, not predicted from the dimensions. Move the slider and the rows are encoded again, so you can stop at the first setting that looks right.
Transparency, and where AVIF blurs#
AVIF has an alpha channel, so a transparent background stays transparent, soft edges and drop shadows included.
In lossy mode the encoder stores colour at half the resolution of brightness, as video does. Photographs and gradients lose nothing you would notice, but thin coloured lines and small coloured text can soften at their edges. For a screenshot full of small print, check the result at full size, or keep it as a PNG and run it through the image compressor instead.
Lossy or lossless#
Lossy is the right choice for almost anything shown on a web page, since it is where AVIF's small files come from. Lossless keeps every pixel exactly, colour at full resolution and transparency included. It suits a picture you will edit again, a reference image that tests compare against, or a destination that takes only AVIF and must not change the picture. The quality slider greys out while it is on, because there is nothing left to trade.
A lossless file is far larger, and it only sometimes beats the PNG. In testing, a 1920 by 1080 photo saved as a 4.1 MB PNG became a 3.1 MB lossless AVIF, against 128 KB lossy at 60%. A 1440 by 900 screenshot of text and flat panels went the other way: 401 KB as a PNG, 865 KB as a lossless AVIF, and 113 KB lossy. For a screenshot or a flat graphic that has to stay exact, the PNG you already have is usually the smaller file.
Why it takes longer than other converters#
Every current browser can display AVIF, and none can write one, so this page carries the libavif encoder compiled to WebAssembly. That is a 3.5 MB file, about 1 MB as it travels compressed, fetched the first time you convert a file rather than with the page. It runs in the background, so the page stays responsive while it works.
Encoding AVIF is slow work by design: the encoder searches for the smallest way to describe each block of the picture. On a recent laptop a small image takes a fraction of a second and a 12 megapixel one about three seconds, the first of them including the time to fetch the encoder. The timing under the list shows what your device actually took.
Frequently asked questions#
Are my images uploaded anywhere?
#
No. The encoder is part of this page and runs on your device, and the files never leave it. Once the encoder has loaded, the page keeps working with the network switched off.
Can every browser open an AVIF?
#
Current versions of Chrome, Edge, Firefox, and Safari all display AVIF. Older desktop software is where it falls short: some image editors and upload forms still reject it. Keep the PNG for anything that has to open in an application you cannot check first.
What quality should I use?
#
The slider starts at 60%, where photographs and graphics look unchanged at normal size and the files are small. Go higher for images with fine text or thin lines, since those show compression first. Below about 40% the picture starts to smear.
When should I use lossless AVIF?
#
When the picture has to decode to exactly the pixels of the PNG and the destination wants AVIF: an image you will edit again, a test reference, or an archive copy. For anything shown on a website, lossy at 60% looks the same and is a small fraction of the size. Lossy at 100% is close to the PNG but not an exact copy, so choose Lossless when the pixels must match.
How do I turn an AVIF back into a PNG?
#
Use the AVIF to PNG converter. Browsers read AVIF natively, so that direction needs no extra download.