PNG to AVIF converter
Convert PNG images to AVIF format
AVIF wraps a single AV1 video keyframe in a HEIF container, and that borrowed video machinery is why it beats every other still format on bytes per pixel. For a PNG source the appeal is obvious: the alpha channel carries over, the colour fidelity at sensible quality settings is high, and the result is often a tenth of the original. The cost is encoder availability and time. AV1 intra coding is heavy, so a large image takes seconds rather than milliseconds, and only Chromium-based browsers can perform this encode at all.
Key facts about PNG to AVIF converter
| Codec | AV1 intra-frame coding in a HEIF wrapper, invoked through the canvas with the image/avif type. |
|---|---|
| Browser requirement | Chrome, Edge, Brave and other Chromium builds can encode. Firefox and Safari display AVIF but cannot write it, and the canvas spec makes them hand back PNG bytes under the .avif name instead. |
| Alpha channel | Supported and preserved, so cut-outs and soft shadows come across from the PNG intact. |
| Quality slider | Active for this target; 90 is the default and maps to the encoder's quality argument. Even 70 is usually clean on photographic content. |
| Speed | The slowest conversion in the image set. A 12-megapixel source can take several seconds per file, and a batch of twenty is a coffee break. |
| Typical size delta | An 8 MB photographic PNG frequently lands between 400 and 800 KB at quality 90 - roughly half what the same picture costs as a JPG. |
| Decode support | Chrome 85 and later, Firefox 93, Safari 16.4, macOS Ventura Preview, and Windows 11 once the AV1 extension is installed. |
| Metadata | The canvas route passes pixels only, so nothing from the PNG's chunks is carried into the AVIF item. |
| Animation | AVIF supports image sequences, but this converter writes a single still frame and nothing else. |
What happens to your file
The AV1 encoder doing the work is the one already compiled into your browser, reached by calling canvas.toBlob with image/avif after your PNG has been decoded and drawn. No WebAssembly codec is fetched, no worker pool is spun up on a server, and the image bytes never form part of a request. The reason a conversion pins a CPU core for a few seconds is precisely that your own machine is doing the encoding - that work would otherwise be someone else's server bill.
About this tool
- 1
Open this page in a Chromium browser
Chrome or Edge will encode real AVIF. In Firefox or Safari the canvas falls back to PNG data, which is the one failure mode worth knowing about.
- 2
Add your PNG files
Photographic and illustrative sources benefit most; a two-colour icon is already tiny as a PNG.
- 3
Set the quality
Start at the default 90 and compare. AVIF holds up far lower than JPG does, so 70-80 is a reasonable target for hero images.
- 4
Convert and wait
Progress moves more slowly than on other targets. When it finishes, check the reported size reduction before downloading.
| Input and output | Takes .png only (image/png) and returns .avif with the image/avif type; any other extension is refused before decoding. |
|---|---|
| Conversion path | PNG to AVIF runs in three steps: an <img> element hands the file to the browser's own PNG decoder; the pixels land on a 2D canvas in this tab; then canvas.toBlob with the image/avif type returns the finished file. |
| Browser support | The PNG side decodes in every browser ever shipped, while writing the AVIF needs a Chromium browser, since Firefox and Safari return PNG bytes under the .avif name. |
| Controls for this pair | A 30 to 100 quality slider (steps of five, default 90) drives the AVIF encode, max-dimension presets from 3840 down to 200 px resize the PNG first, and the strip-metadata toggle is moot on this pair. |
| Batch, caps and naming | Twenty PNG files per run at 500 MB each; one result downloads as a single AVIF, several as converted-avif-files.zip, zipped by JSZip 3.10 in page memory. |
| Device ceiling | The canvas caps it: past roughly 16,384 px a side Chromium refuses the bitmap and iPhone Safari gives up sooner, so an oversized PNG fails before any AVIF bytes exist. |
- Serve AVIF from a picture element with a WebP or JPG fallback source - a small share of visitors still cannot decode it.
- Because the encode is slow, downscale first: encoding a 4K image you will display at 1200 px wastes most of the time spent.
- If the output file is suspiciously large and opens as a normal image everywhere, you are probably on a browser that wrote PNG bytes instead.
- Flat vector-style artwork can compress better as lossless WebP than as AVIF, so it is worth comparing both on the same source.
- Cutting the weight of photographic hero images on a site that already serves modern formats.
- Archiving a large photo library at a visually lossless setting for a fraction of the PNG storage.
- Preparing image assets for an app or a site where bandwidth per visitor is the metric that matters.
Related tools
View allNeed the opposite? Try AVIF to PNG
Works well with this4
Other AVIF tools12
Updated