A PNG is a lossless raster image. It stores every pixel exactly, with sharp edges and full transparency, which is why designers trust it, but that faithfulness makes the files large.[1] AVIF is a newer image format built on the AV1 video codec, and it was designed to hold the same picture in a fraction of the space. Converting PNG to AVIF is how you keep the look of the original while cutting the download weight, which matters most on web pages.
The trade you are making is compatibility for size. AVIF is dramatically more efficient, but it is a modern format, so older software and a few email clients still cannot open it. This guide explains what the two formats actually are, exactly what happens to the pixels during the re-encode, how to weigh lossy against lossless AVIF, and how to pick a quality level that shrinks the file without wrecking the detail.
What changes when PNG becomes AVIF
PNG compresses without throwing anything away, so a re-saved PNG is bit-for-bit the same image. AVIF works differently. By default it uses lossy compression, meaning it analyzes the picture and discards detail the eye is unlikely to miss, then packs what remains far more tightly than PNG can. The visible result is usually indistinguishable, but the file can end up several times smaller.
Two PNG strengths survive the trip. AVIF supports full alpha transparency, so a logo with a see-through background stays transparent. It also supports a wide color range and more than eight bits per channel, so gradients that would band in some formats stay smooth.[4] What you lose is universal support: an AVIF file will not open in every old viewer the way a PNG does.
AVIF keeps transparency and detail while making the file much smaller. It is ideal for the web and a poor choice when you need something that opens everywhere.
PNG and AVIF: lossless versus modern lossy
The two formats come from opposite design philosophies, and the gap between them is the whole reason the conversion pays off. PNG, the Portable Network Graphics format, was created in the mid-1990s as a patent-free successor to GIF and is standardized today by the W3C.[1] It stores pixels in a chunk-based structure, filters each scanline to expose patterns, and compresses the whole image losslessly with DEFLATE, the same algorithm used inside ZIP.[2] Because DEFLATE never discards data, PNG is mathematically exact, which is superb for fidelity but limits how small the file can get: there is only so much redundancy a lossless coder can squeeze out of a detailed photograph.
AVIF is the image counterpart of the AV1 video codec, defined by the Alliance for Open Media, and it packages a single AV1-coded still frame inside the ISO base media container that modern video uses.[3] AV1 brings a generation of newer coding technique that PNG never had access to: large and variable block sizes, sophisticated intra-frame prediction that guesses a block from its neighbors, and a modern entropy coder. Applied as lossy compression, this lets AVIF represent the same visible image with far less data than PNG, and it is why a heavy PNG can shrink several times over when re-encoded.
How the re-encode works under the hood
A PNG-to-AVIF conversion is a full decode-and-re-encode, not a repackaging, because the two formats share no compression machinery at all. First the tool decodes the PNG: it runs DEFLATE in reverse and undoes the scanline filters to rebuild the exact grid of pixels the PNG stored, including the alpha channel. At this moment you have the picture in memory as a raw raster, identical to the original.
Then the tool re-encodes those pixels with the AV1 image encoder at the quality you chose. The encoder partitions the image into blocks, predicts each block from its surroundings, transforms and quantizes the difference, and packs the result. If you asked for lossy AVIF, this stage discards detail the eye is unlikely to miss; if you asked for lossless AVIF, it keeps everything and simply codes it more cleverly than DEFLATE could. Either way the alpha channel is preserved as a separate plane, which is how transparency survives. Because the source PNG was already a perfect image, no generation loss is stacked here beyond the single AVIF pass you choose, which is a genuine advantage of converting from a lossless source rather than another lossy file.
This is a real distinction worth dwelling on. When you convert a JPG to AVIF you are compressing data that was already compressed and approximated once, so the AVIF encoder inherits and then re-approximates the JPG's existing artifacts. Converting a PNG avoids that entirely: the encoder sees the original, pristine pixels and makes exactly one set of decisions about what to keep. The practical result is that a PNG source can often reach a slightly smaller AVIF at the same visible quality than a JPG source of the same image would, because the encoder is not wasting bits faithfully reproducing another format's compression noise. If you have a choice of what to convert from, the lossless original is always the better starting point.
Lossy, lossless, and choosing between them
AVIF can run in two modes, and picking the right one matters. Lossy AVIF is the default and the reason to convert at all: it delivers the dramatic size reductions AVIF is famous for, and at a sensible quality the result is visually indistinguishable from the PNG. This is the correct choice for almost every web image, where a file a few times smaller means faster pages and less data used.
Lossless AVIF keeps every pixel exactly, like PNG, but codes them with AV1's smarter machinery. It is usually still smaller than the equivalent PNG, though the gap is far narrower than with lossy mode, and the encode is slower. Reach for it only when you genuinely cannot tolerate any change to the pixels, such as an icon set or a diagram that must stay pixel-perfect. For photographs and rich illustrations, lossy AVIF is almost always the better trade, because the invisible savings are enormous and the visible cost is nil.
There is one type of PNG where you should think twice before converting at all: a flat graphic with only a handful of colors, such as a simple logo or a screenshot of solid-colored UI. PNG is already extremely efficient on that kind of image, because its lossless DEFLATE coding thrives on large areas of identical color, so the AVIF savings can be modest and, at aggressive quality, AVIF may even introduce faint ringing around crisp edges that a lossless PNG never would. AVIF's advantage is largest on photographic and richly detailed images, where PNG's lossless coding struggles and AV1's prediction shines. Matching the format to the content, rather than converting everything by reflex, is what separates a genuine size win from a lateral move.
Convert PNG to AVIF, step by step
Open the converter and add your PNG
Open the FileFormer image converter and drop your PNG in. It runs entirely on your device, so the image is never uploaded.
Select AVIF as the target
Choose AVIF from the output formats. This tells the tool to re-encode the picture with AV1-based compression rather than the lossless method PNG uses.
Set the quality
Keep quality high for photographs and detailed art. For flat graphics and icons you can push it lower and still see no difference, which shrinks the file even more.
Convert and download
Export the AVIF and compare it to the original at full zoom. If it looks clean, you are done; if you spot softness, raise the quality a notch and convert again.
Choosing a quality level
Unlike PNG, AVIF gives you a quality dial, and where you set it depends on the kind of image. The table below is a starting point, not a rule.
| Image type | Suggested quality | Why |
|---|---|---|
| Photograph | High | Fine detail and grain show compression first |
| Illustration with gradients | Medium to high | Smooth color shifts need headroom |
| Flat logo or icon | Medium | Solid colors survive heavy compression |
| Screenshot with text | High | Sharp edges on letters can blur if pushed |
If the AVIF has to stay perfectly lossless, some converters offer a lossless AVIF mode. It is still usually smaller than the PNG, though the gap narrows compared with lossy AVIF.
Settings that shape the result
Beyond the single quality number, a few controls change how an AVIF turns out. Knowing what each does helps you tune the balance between size, sharpness, and how long the encode takes.
| Setting | What it controls | Practical guidance |
|---|---|---|
| Quality | How much detail is kept versus discarded | High for photos and text; medium is fine for flat graphics |
| Encoder effort or speed | How hard the encoder searches for the best coding | Slower effort gives smaller files at the same quality; worth it for images served many times |
| Chroma subsampling | Color resolution relative to brightness | 4:2:0 saves size on photos; keep 4:4:4 for crisp colored text or fine graphics |
| Lossless mode | Whether any pixels change at all | Only for pixel-perfect icons or diagrams; leave off for photos |
The setting most worth your attention is encoder effort. Because a web image is typically encoded once and then served to thousands of visitors, letting the encoder work harder for a smaller file is almost always a good trade; the size win is collected on every single download. Chroma subsampling is the one to watch for a common failure: a PNG full of colored text or sharp graphic lines can pick up color fringing under 4:2:0, so keep it at 4:4:4 for that kind of content.
When to keep the PNG instead
Reach for AVIF when the image lives on a web page or app that you control and you want the smallest possible download. Skip it when the file has to open in older tools, drop into an email, or land in a workflow that has not caught up to modern formats yet. In those cases a PNG, or a more broadly supported option like WebP, is the safer file to hand over.
Also keep the PNG as your master copy. AVIF is a delivery format, and because the lossy version has already discarded some detail, you do not want to keep editing from it. Convert a fresh copy whenever you need a new AVIF.
AVIF versus WebP and JPG
AVIF is not the only modern option for shrinking a PNG, and the right pick depends on how much you value size against reach.
WebP is the pragmatic middle ground. It also supports lossy compression and full alpha transparency, it is usually smaller than PNG though not as small as AVIF, and it enjoys broader support across older browsers and tools. When you want strong savings but cannot risk an image that some visitor cannot open, converting PNG to WebP is the gentler step. JPG is the wrong target for a PNG in most cases, because it cannot store transparency at all and its older block-based compression is less efficient than either AVIF or WebP; it only makes sense for a fully opaque photograph that has to open in very old software. The honest ordering is simple: AVIF for the smallest modern files when you control the page, WebP for wide compatibility with good savings, and PNG itself whenever the file must open absolutely everywhere.
Shrink your PNG to AVIF now
Pick a quality level and export, all in your browser with nothing uploaded.
Key takeaways
- AVIF re-encodes the PNG with the AV1 codec, storing the same picture in far less space and keeping transparency.
- Converting from a lossless PNG stacks no generation loss beyond the single AVIF pass you choose.
- Use higher quality for photos and text, lower for flat graphics; keep 4:4:4 for colored text.
- Choose AVIF for the web, WebP for wide compatibility, and keep PNG when the file must open everywhere.