Image guides
How to Convert PNG to AVIF in Your Browser
PNG is a lossless, editing-friendly format; AVIF trades some of that for a much smaller file when a browser can encode it. This guide explains what the browser actually does during that re-encode, what stays intact, and when the trade is worth making.
Ready to try the tool this guide describes?
How PNG becomes AVIF
- The browser decodes the PNG into a full pixel grid, including its alpha channel if the file has one — PNG’s own compression is lossless, so this recovers the exact pixel values that were originally saved.
- That pixel grid is drawn onto a canvas without any background fill, keeping transparent and semi-transparent areas intact rather than painting over them.
- The canvas is then encoded as AVIF using the browser’s AV1-based image encoder at your chosen quality setting — a lossy step, since AVIF’s compression discards some information to reach a smaller file.
- Before the download is offered, the tool verifies the resulting blob is genuinely image/avif rather than a silent fallback format, so you never end up with a mislabeled file.
What changes when you convert
The biggest shift is that lossless becomes lossy. PNG stores every pixel exactly; AVIF’s encoder — even at a high quality setting — makes compression trade-offs the PNG never had. That’s the source of AVIF’s size advantage, and also the reason this conversion isn’t reversible without quality loss.
Transparency generally survives the trip. When the browser’s AVIF encoder supports alpha, which current versions of Chromium-based browsers do, semi-transparent and fully transparent pixels are preserved rather than flattened onto a background color.
File size usually drops, sometimes substantially, but “usually” isn’t “always” — a PNG that’s already small, or one with content that compresses awkwardly under AV1, can occasionally end up larger as an AVIF. Compare the actual output rather than assuming the size will shrink.
When AVIF is the right choice — and when it isn’t
AVIF is worth using when you’re preparing an image for a website or app that already serves modern formats and you want the smallest file that still keeps transparency — icons, illustrations, and UI graphics with alpha channels are good candidates. The savings compound across a page with many images.
It’s the wrong choice when you need the file to keep editing losslessly, since every future re-save re-applies AVIF’s lossy compression. It’s also a poor fit if the destination’s AVIF support is uncertain — plenty of software and older browsers still can’t open an AVIF at all, in which case keeping the PNG, or converting to WebP instead, is the safer bet.
Limitations and privacy
AVIF encoding support in the browser is Chromium-first today — Chrome, Edge, and similar browsers handle it, while others may not expose canvas AVIF encoding at all. When that’s the case, the tool fails clearly with a compatibility message instead of silently saving a different format under an .avif name.
The quality slider (50–100%, default 90%) is the only control over the lossy trade-off; there’s no true lossless AVIF mode in this tool. Conversion runs entirely in your browser, and your PNG is never uploaded to a Looty Tools server.
Convert PNG to AVIF FAQ
- Why is AVIF encoding lossy even though PNG was lossless?
- AVIF’s AV1-based codec is designed around discarding some information to shrink file size, which is the whole reason it can compress harder than PNG. Even at a high quality setting, some data PNG would have kept exactly is approximated instead.
- Why can’t some browsers create AVIF even though they can open one?
- Decoding AVIF (to view it) and encoding AVIF (to create it) are separate capabilities, and browsers have generally added decode support faster than encode support. Canvas-based AVIF encoding today is Chromium-first, so Chrome, Edge, and similar browsers can produce this conversion’s output while some others can’t yet.
- Why would a PNG end up bigger after converting to AVIF?
- AVIF usually compresses smaller, but not universally. A PNG that’s already small, or content that doesn’t compress well under AV1, can occasionally produce a larger file — it’s worth checking the actual result rather than assuming.
- Is it safe to convert a PNG I still plan to edit further?
- Keep the PNG as your working master if you’ll be editing it further. AVIF’s quality setting is lossy, so every re-save after converting adds another round of compression the PNG original never had.
- Does my image ever leave my device during conversion?
- No. Decoding, alpha handling, encoding, and the MIME-type verification all happen locally in your browser — nothing is uploaded to Looty Tools.
Related guides
- PNG to AVIF Without UploadingLearn how Looty Tools converts PNG to AVIF privately in your browser, verifies the output MIME type, and avoids conversion uploads.
- PNG vs AVIFCompare PNG and AVIF for transparency, lossy quality, editing workflows, and when converting PNG to AVIF is the better delivery choice.
- Convert PNG to WebPConvert a PNG image to WebP locally with adjustable quality. Transparency is kept when the browser encoder supports alpha.