PDFMove
How Do You Convert a PNG File to AVIF Format?
How-To

How Do You Convert a PNG File to AVIF Format?

7 min read

Why is PNG so large?

PNG is a lossless format: it stores the value of every pixel in the image without discarding any information. That is a wonderful property for screenshots, logos and graphics requiring transparency — edges stay sharp, text stays legible, and there is no degradation even if you save it over and over.

The same property turns into a disadvantage on the web. When you save a photo-like, multi-coloured image as PNG, the file easily reaches several megabytes. However well designed your page is, if the total image weight that has to be downloaded on load is large, the wait becomes noticeable on a mobile connection.

This is exactly where AVIF comes in.

What does AVIF do to make the file smaller?

AVIF is a modern format that uses the image compression side of the AV1 video codec. Because video codecs have been developed for decades around the question "how do I describe the same image with less data", applying that accumulated knowledge to a single frame delivers a clear gain over the classic formats.

In practice AVIF can carry the same visual quality with less data than JPG or WEBP. Compared with lossless PNG the difference is far greater still, because PNG discards no information at all.

AVIF's real advantage over PNG is not just size:

  • Alpha channel support — transparency is preserved, complete with its soft transitions
  • Wide colour and HDR — it can carry 10-bit and higher colour depth
  • Both lossy and lossless modes — selectable to suit your needs

Step-by-step conversion

1. Choose your PNG file

Open our PNG → AVIF conversion tool and drag and drop your file, or add it through the file picker. No registration required.

2. Verify the file type

The tool is configured to accept PNG only. If the file you have shows a .png extension but is actually a renamed JPG, you will not see the transparency benefit you expect from the conversion — because there is no transparency in the source to begin with.

3. Set the quality according to the content

A single quality value is not ideal for every image, and this is the most neglected decision in the conversion.

With photographic content — product shots, landscapes, natural textures — you can go fairly aggressive. In this kind of image the simplifications lossy compression makes get lost inside a structure that is already irregular, and the result is indistinguishable from the original.

Images containing text, thin lines and sharp edges need a noticeably higher quality value. Here every discarded piece of information comes straight out of the crispness of some structure; letters soften and thin dividers fade.

Grouping your images by type and converting each group with an appropriate setting keeps you clear of both unnecessarily large files and degraded text.

4. Test with a sample before converting a large archive

This is the most frequently skipped step and the most expensive one to skip. Converting hundreds of files in one go and noticing the result afterwards is a mistake you cannot undo.

Pick five to ten files representing the variety of PNGs you hold: a photograph, a transparent logo, a screenshot, a banner with lettering on it. Convert these with your chosen setting and examine the results at full size. If your setting gives acceptable results across all of them, you can move on to batch processing.

Also factor in that AVIF encoding is computationally heavy. Because the encoder evaluates far more options, the operation takes noticeably longer than saving the same image in a classic format. For small images this is a matter of seconds; for an archive of thousands of files it is time you need to plan for. This is not a fault, it is the nature of the format.

5. Download the result and compare it with the original

Open the AVIF file you downloaded side by side with the original PNG. Look particularly at these points:

  • Are the edges of transparent areas clean?
  • Have thin lines and small text stayed legible?
  • Has banding appeared in colour transitions?

If you expect transparency, place the image over a dark background and confirm the edges have stayed clean; with logos that have edge anti-aliasing, aggressive settings give themselves away here.

If the result satisfies you, check the difference in file size too — in most cases the gain is striking. If it does not, raise the quality value and try again; because the original PNG is still in your hands you can repeat this as many times as you like.

6. Plan a fallback source

If you are going to use the image on a website, do not put the AVIF up on its own. With the <picture> element, define AVIF first and then PNG or JPG; a browser that cannot open the AVIF quietly falls back and the user does not see an empty box.

When should you stay with PNG?

AVIF is not the right answer in every situation. In the following cases keeping PNG makes more sense:

If the image is an archive copy. A lossless source is essential for every edit and regeneration you will make in future.

If the content is sharp-edged graphics or dominated by small text. In screenshots, interface designs and technical drawings, the softening effect of lossy compression can reduce legibility.

If the image is going into editing software. Many desktop programs still cannot open AVIF; putting an incompatible format in the middle of your workflow creates needless friction.

If your audience uses older devices. In a context where you cannot supply a fallback source (an email newsletter, for instance) AVIF can be risky.

Let us talk plainly about the compatibility risk

This is the most underestimated issue when moving to AVIF, and it needs saying honestly: an AVIF file may not open at all on the other end.

Current mainstream browsers support the format, so serving it on your own web page is a reasonable decision. But once you put the file into circulation as a file, the picture changes. Here are the places where problems are to be expected:

  • Older devices and long-un-updated operating systems. The file may not even show up in preview.
  • Desktop programs. Older Photoshop versions, classic viewers and most office software do not recognise AVIF.
  • Upload forms. Many e-commerce panels, listing sites and application systems check file types against a whitelist, and AVIF is usually not on that list.
  • Email attachments. You cannot assume the recipient will be able to open the file.
  • Social and messaging platforms. Some reject it, some accept it and convert it to their own format.

The practical rule is simple: serve AVIF on a page you control, with a fallback; when you need to send someone a file, send PNG or JPG.

Remember too that for an element requiring transparency your fallback must be PNG — JPG does not support the alpha channel and fills transparent areas with a solid colour.

Summary

Moving from PNG to AVIF is one of the most effective ways to cut file size significantly for images published on the web, and transparency is not lost in the process. Against that you need to watch two things. First, when lossy mode is used the conversion is one-way; do not proceed without keeping the original PNG, and always test with a sample before batch converting text-heavy images. Second, AVIF does not work everywhere; do not go live without defining a fallback source, and fall back to the classic formats when you need to share as a file.

Frequently Asked Questions

Is a PNG's transparent background preserved when it becomes AVIF?

Yes, AVIF offers full alpha channel support and the transparency information in the PNG is carried over as is. What is more, like PNG, AVIF can store softly graded (partially transparent) pixel values, so the semi-transparent pixels at the edge of your logo do not harden. In this respect AVIF differs from GIF, which handles transparency as a binary state, and from JPG, which does not support it at all. For logos, icons and product images that require transparency, AVIF is a safe destination.

Is AVIF conversion lossless, or will my image be degraded?

AVIF can operate in both lossy and lossless modes; in practice the default mode used for the web is lossy, and it shrinks the file considerably. With photo-like content this loss is usually imperceptible. However, with images containing sharp-edged graphics, technical drawings with thin lines or small point-size text, lossy compression can create slight softening along the edges. For such content it is better to compare the output side by side with the original and stay with PNG if necessary.

Can I delete my PNG file after converting?

We recommend you do not. If the AVIF output was produced lossily, part of the information in the original PNG has been discarded irretrievably; if you later need to edit the image, regenerate it at a different size or convert it to another format, you will need the lossless PNG as your source. Thinking of the AVIF as your publication copy and the PNG as your archive copy is the safest approach.

Can every browser open AVIF?

Current mainstream browsers support AVIF, so the great majority of today's user base views it without trouble. Against that, older browser versions, un-updated systems in some corporate environments, older operating systems and many desktop image editing programs still cannot open AVIF. If you are using it on a website, the most robust method is to give AVIF as the first source and JPG or PNG as the fallback source with the `<picture>` element.

Try this out right away with PNG → AVIF Dönüştür.

Try PNG → AVIF Dönüştür