PNG to AVIF
Your browser can display AVIF but cannot write it: ask Chrome or Firefox for an AVIF from a canvas and you quietly get a PNG back. This page brings its own encoder — libavif, compiled to WebAssembly — and runs it in the tab, so you get genuine AVIF files with transparency intact, and nothing is uploaded.
Drop PNG, JPG or WebP files here
Anything your browser can open — multiple files allowed
The encoder is a 0.8 MB download from jsDelivr, fetched the first time you convert and cached by your browser after that. Your images are never uploaded.
How to convert PNG to AVIF
- Drop one or more images on the box, click it to browse, or paste one with Ctrl/⌘+V.
- Leave quality at 60 for a first try. Lower it until you can see damage, then step back up.
- Switch colour detail to 4:4:4 for screenshots, interface art or anything with small coloured text.
- Press Convert to AVIF. Each result shows its size and how much smaller (or larger) it is than the file you dropped; with two or more there is a single ZIP download.
Why the browser can't do this on its own
The obvious shortcut — draw the image on a canvas and call canvas.toBlob(…, "image/avif") —
does not work. Chromium's canvas encoder only knows PNG, JPEG and WebP; Firefox's knows those plus
BMP and ICO. And the HTML standard says that when a page asks for a type the browser can't write,
the browser must produce a PNG instead, without an error. So in Chrome and Firefox that call
returns a PNG, and a converter built on it hands you a PNG with an .avif name.
This page doesn't ask the browser. It loads libavif 1.0.1 with the libaom 3.7.0 AV1 encoder, as packaged by the jSquash project (Apache-2.0, from Google's Squoosh), runs it in a background worker so the page stays responsive during a long encode, and checks every output for the AVIF file signature before offering it to you.
What the settings do
- Quality is libavif's 0–100 scale. Lower means smaller and blurrier. There is no universal "right" number; the size badge on each result is there so you can compare a few.
- Encoder effort maps to libavif's speed setting (0 slowest to 10 fastest). More effort lets the encoder search harder for a smaller file at the same quality, and costs time — "Smallest" on a large photo can take a long while in a browser tab.
- Colour detail. 4:2:0 stores colour at half the resolution of brightness in both directions, which suits photographs. 4:4:4 keeps colour at full resolution, which is what thin coloured lines, red text and UI screenshots need to stay sharp.
- Lossless sets quality 100 with 4:4:4, which is libavif's lossless mode: pixels are stored as RGB without the usual conversion to YUV, so every pixel decodes back exactly. It is not guaranteed to beat the PNG you started with — the percentage next to the result tells you.
Transparency, bit depth and what is dropped
AVIF has an alpha channel, and it is kept: a transparent PNG becomes a transparent AVIF. Output is 8 bits per channel, because a canvas is 8-bit — 10- and 12-bit AVIF need a 16-bit source this page never sees. Metadata (EXIF, colour profiles, text chunks) is not carried over, and an animated PNG or GIF contributes its first frame only.
Where AVIF opens
Chrome 85, Firefox 93, Edge 121, Safari 16.4 and Safari on iOS 16 or later display AVIF (Safari
16.1–16.3 handles still images on macOS Ventura and later). If you still serve older browsers, put
the AVIF in a <picture> element with a WebP or JPG fallback. To turn an AVIF back
into something every app opens, use AVIF to PNG.
FAQ
Are my images uploaded?
No. The only network request is the one-time download of the encoder itself, which carries no image data. Encoding happens in a worker inside this tab — you can watch the Network panel stay quiet while it runs.
Why is the first conversion slower than the rest?
The first run fetches and compiles the 0.8 MB encoder. After that it stays loaded for the rest of the visit, and your browser keeps the download for next time.
Should I use AVIF or WebP?
Try both on your own image: compare the size badges here against PNG to WebP at a quality that looks the same to you, because the winner depends on the picture. WebP is the safer choice for reach — Safari has displayed it since version 14, AVIF only since 16.4 — and in Chrome and Firefox WebP is written by the browser's built-in encoder, where AVIF here is computed in WebAssembly.
Is lossless AVIF really lossless?
Yes, in the sense that matters: every pixel decodes back to the value you put in. Pixels that were fully transparent in the source carry no colour information in a browser canvas, so their hidden RGB values are not preserved — only the fact that they are transparent.
Can it make an animated AVIF?
No. Animated input gives you the first frame as a still AVIF. For animation, PNG to APNG and PNG to GIF build a sequence from separate frames.