Convert ICO to AVIF

Converting ICO to AVIF takes the largest image out of the icon container and re-encodes it with the AV1 still-image codec, transparency included. The measurement worth having before you start: on a 256-pixel icon the AVIF came out at 3,624 bytes against 1,737 bytes for the same picture as a PNG.

  • Where it runs In your browser. The file is never uploaded.
  • Lossy Some detail is traded for size. AVIF cannot hold everything an ICO can.
  • File size limit Up to 100 MB per file, free, without an account.

Up to 100 files at once. Mixed formats are fine.

What ICO to AVIF actually does

A generated landscape with a low sun and three ridges, used to show what JPEG does to continuous tone. Shown as ICO.

ICO139 KB

A generated landscape with a low sun and three ridges, used to show what JPEG does to continuous tone. Shown as AVIF.

AVIF17 KB8.1× smaller

A photographic scene — smooth gradients, soft edges, grain. This is the case AVIF is designed for or against, and the figures show which. Both images are drawn in code and encoded by the same converter that runs on this page, so the sizes are this site's own output.
A generated badge: a circular gradient on a transparent background with a white bar across it, used to show what each format does with transparency and with hundreds of shades. Shown as ICO.

ICO7 KB

A generated badge: a circular gradient on a transparent background with a white bar across it, used to show what each format does with transparency and with hundreds of shades. Shown as AVIF.

AVIF3 KB2.0× smaller

A transparent background and a gradient across the shape. AVIF either keeps both, keeps one, or fills the transparency with a solid colour — which is the difference that catches people out. Both images are drawn in code and encoded by the same converter that runs on this page, so the sizes are this site's own output.
A generated application window with a sidebar, a table and a bar chart, used to show what JPEG does to flat colour and hard edges. Shown as ICO.

ICO3 KB

A generated application window with a sidebar, a table and a bar chart, used to show what JPEG does to flat colour and hard edges. Shown as AVIF.

AVIF5 KB93% larger

Flat colour and hard edges, as in an interface, a chart or a logo. Very different behaviour from the photograph above, and the reason the answer is "it depends what is in the file". Both images are drawn in code and encoded by the same converter that runs on this page, so the sizes are this site's own output.

AVIF is a still frame of a video, and that decides the outcome

AVIF is not an image format that happens to compress well; it is the intra-frame path of the AV1 video codec with a container around it. Everything it is good at follows from that. AV1 was built to predict the contents of a block from its neighbours and to discard the residual detail a moving eye will not catch, which is an extraordinarily effective strategy on photographs and on film grain.

An icon has neither. It is a small number of flat regions with hard boundaries and a few dozen antialiased pixels along each edge. There is no texture to model, no gradient to predict and very little residual to throw away — so the machinery that makes AVIF win on a photograph has almost nothing to do, while its fixed overheads remain.

The measured sizes, and what they say about the migration

On a test icon of 8,471 bytes holding four entries, converted at the default quality of 82, the results were: 1,737 bytes as PNG, 1,894 as GIF, 3,054 as WebP, 3,624 as AVIF and 4,005 as JPEG. The order is almost exactly the reverse of the one the same test on a photograph would give.

That is not a marginal difference. The AVIF is more than twice the PNG and it is the lossy one. For a directory of two hundred icons, migrating them to AVIF adds roughly 380 kilobytes to what the site ships rather than removing anything. Carve the icons out of the migration and keep them as PNG.

The alpha channel survives, and it is part of the cost

Transparency is preserved: on the test icon the corner pixel of the resulting AVIF reads 0,0,0,0. That is not a given for every efficient format — the GIF path on this site turns the same corner opaque black — so if the mark is a cut-out and the format has to be AVIF, at least this part works.

It works by coding the alpha as a second plane alongside the colour, effectively a second small image inside the container. On a photograph that overhead is lost in the noise. On a 256-pixel icon, where the whole file is a few kilobytes, it is a visible share of the total and part of why the number above is what it is.

The encoder is slow, and a folder of icons makes it obvious

The AVIF encoder is the largest WebAssembly module this site ships and the slowest to run, because encoding a still AVIF means running an AV1 intra-frame search. For one file it is a pause. For a folder of two hundred icons converted in one go it is a genuine wait, and it is your own processor doing it rather than a server.

This is worth weighing against the byte result rather than separately from it. Spending real encode time, on every build, to make each icon twice as large is a poor trade in both directions at once.

Only the biggest drawing in the container is encoded

An ICO holds the same mark at several sizes and an AVIF holds one picture, so something has to choose. Your browser’s icon decoder does, and it returns the largest entry — verified by building a file with 16, 32, 48 and 256 pixel drawings in four different colours and converting it with the directory written in three different orders.

The ceiling is 256 pixels, set by the ICO format rather than by AVIF, which reaches 65,536. So the input to the encoder is always a small image, which is the condition under which every efficient format performs worst relative to PNG.

Twelve-bit colour on artwork that uses eight

AVIF can store twelve bits per channel and a wide colour gamut, which is one of its genuine advantages over WebP and JPEG for photography and for high-dynamic-range material. An icon file stores eight bits per channel in a standard gamut and always has.

So this capability is available and unused. It costs nothing directly, but it is a fair summary of the pair: almost everything AVIF is better at is something an icon does not have. The one property it brings that matters here — alpha — is one PNG already had.

Browser support is good enough and is not universal

Every current major browser decodes AVIF, and has for several years. That is enough for most sites to serve it directly. It is newer than WebP, so the tail of clients that cannot read it is longer, and the usual answer is a picture element with a fallback source rather than a straight replacement.

Note what that means for an icon: you now ship two files instead of one, and the fallback is the PNG that was smaller in the first place. The complexity is real and the saving is negative.

The exception worth carving out of an AVIF migration

A blanket rule is attractive because it removes a decision from every future build, and blanket rules about image formats are usually right. This is the case where one is not. Split the rule by content rather than by directory: photographs and screenshots to AVIF, flat artwork and icons to PNG, and write the reason next to the rule so the next person does not "fix" it.

If the pipeline genuinely cannot express two rules — some CDN transforms cannot — then converting the icons is a defensible cost of uniformity. Know that it is a cost, and know roughly how large: a couple of kilobytes per icon, in the wrong direction.

Converting an icon directory to AVIF in one pass

Drop the folder. Every file is decoded and encoded on its own and the results return as a ZIP, with one quality setting across the batch. Expect it to take noticeably longer than the same batch to PNG or WebP, for the reason above.

The dimensions will not be uniform unless the source set was. Icon collections mix files that carry a 256-pixel entry with files that stop at 32, and since the encoder’s fixed overheads matter more the smaller the image, the 32-pixel members of the set are where AVIF compares worst of all.

Check the result before it replaces the icon in the repository

Two things are worth looking at, and neither takes long. The first is the byte count of both files side by side, because that is the number the migration was undertaken for and it is the one most likely to be assumed rather than measured. The second is the mark itself at the size it will actually be displayed — not zoomed in, where lossy artefacts look alarming and nobody will ever see them, and not as a thumbnail, where everything looks fine.

Keep the original icon file either way. It is the only thing that still holds the small hand-drawn entries, it is a few kilobytes, and it is what a browser will keep requesting from the root of the site regardless of what the build produces.

How to convert an ICO file into an AVIF image

  1. Drop your ICO file onto this page, or click to choose one.
  2. Wait for the AV1 encoder — it is slower than the other codecs.
  3. Download the AVIF, transparency included.

ICO against AVIF: flat icon artwork meeting a video codec

ICO compared with AVIF
ICOAVIF
Full nameWindows IconAV1 Image File Format
File extension.ico.avif
Media typeimage/x-iconimage/avif
CompressionLossless — nothing is discardedEither, depending on the setting
First published19852019
Published byMicrosoftAlliance for Open Media
SpecificationAV1 Image File Format
LicensingPublished, not standardisedOpen standard
Standing todayNicheCurrent
Bit depth812
Colour it can describeRGB, indexed paletteRGB, YCbCr, wide gamut
Largest image256 px per side65,536 px per side
Opens in a browserEvery browserCurrent browsers
Considered insteadPNG, SVGWebP, JXL, JPG

What survives

Transparency survives. Both ICO and AVIF store an alpha channel, so a cut-out stays cut out and nothing is filled in behind it.

Opening the result

Current browsers read AVIF; older ones do not. It is the less portable of the two, so it is worth being sure the program at the other end accepts it before sending one.

AVIF is a container rather than a single format. What actually plays is the codec inside it — usually AV1 — which is why two files with the same extension can behave differently on the same device.

GIMP reads both ICO and AVIF, so there is a way to check the result against the original without a second tool.

What each format is for

ICO is Microsoft's format, published in 1985. It records 8 bits per channel.

AVIF comes from Alliance for Open Media and dates from 2019, specified as AV1 Image File Format. GIMP, Squoosh and ImageMagick all read it.

ICO was published in 1985 and AVIF in 2019. The older one is generally the safer file to hand to somebody; the newer one usually does the job in fewer bytes.

ICO to AVIF: file size, transparency and browser support

Is the AVIF smaller than the PNG for an icon?

No. Measured on a 256-pixel icon: 3,624 bytes as AVIF at the default quality against 1,737 bytes as PNG. AVIF’s advantage comes from modelling photographic texture, and flat icon artwork has none for it to work on.

Does the transparency survive?

Yes. AVIF carries an alpha channel and it is preserved through the conversion — on a test icon the corner pixel of the result reads 0,0,0,0. The alpha is stored as a second coded plane, which is part of why the file is not as small as expected.

Which of the icon’s sizes is converted?

The largest one in the file, and never more than 256 pixels, because that is the ceiling the ICO format imposes on any entry. The smaller drawings in the container are discarded.

Why does the conversion take a moment?

AVIF is a still frame of an AV1 video and the encoder does the work a video encoder does. It is the slowest and largest of the codecs on this site, which matters when you drop a folder of two hundred icons rather than one.

Can every browser display it?

Current versions of every major browser can. AVIF is newer than WebP, so if you support genuinely old clients keep a fallback in a picture element rather than replacing the original outright.

Is anything uploaded during the conversion?

No. The AV1 encoder runs as WebAssembly in your browser, so a slow conversion is your own processor working rather than a queue on somebody’s server.

More about these formats

Where these figures come from

The claims this page makes about ICO and AVIF are checkable, and these are the documents that settle them.