Convert HEIF to ICO

Converting HEIF to ICO produces an icon container holding the classic set of sizes — 16, 32 and 48 pixels by default, nothing above 256. It works, it runs entirely in your browser, and for most readers the honest recommendation on this page is to draw a mark instead of shrinking a photograph into three sizes of the same smudge.

  • Where it runs In your browser. The file is never uploaded.
  • Lossy Some detail is traded for size. ICO cannot hold everything a HEIF can.
  • File size limit Up to 100 MB per file, free, without an account.
  • Worth knowing Scaled down to icon sizes; detail beyond 256 pixels is discarded.

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

The uncomfortable part first: photographs do not shrink into icons

An icon is displayed at 16, 32 or 48 pixels most of the time. At 16 pixels across you have 256 pixels in total to work with, which is enough for perhaps three shapes and two colours. Photographs are made of hundreds of thousands of small tonal differences, and every one of them is averaged away at that scale.

The result is not a small photograph, it is a coloured smudge. This is why every icon you can recall — a folder, an envelope, a company mark — was drawn as a handful of high-contrast shapes rather than photographed. Nothing about the conversion below changes that, and knowing it before you spend an afternoon on it is the most useful thing this page has.

What this converter puts into the ICO

The file is a six-byte header, sixteen bytes of directory for each size, and then a PNG for each. The specification also allows a raw bitmap payload and that is what it originally meant, but every Windows since Vista reads a PNG inside an ICO and the file comes out a fraction of the size.

How many entries is yours to choose, and the default is three: 48, 32 and 16 pixels, written largest first. That is the multi-size file the phrase "favicon.ico" implies, and it matters if you are replacing one — whatever displays the icon reads the directory and takes the entry it wants rather than resampling a large image itself. What it does not do is change the picture. You now decide how the 16-pixel version is produced, and it is still your photograph reduced to 16 pixels.

The 256-pixel ceiling, and a byte that says 0

ICO stores each image's width and height in a single byte each, so 256 is the largest value the format can describe. The longest edge of your picture is scaled down to that ceiling before anything else happens — a 4,032-pixel photograph becomes 256 pixels across — and each size in the file is then reduced from that, so with the default set the largest thing you keep is 48 pixels.

The value 256 does not fit in one byte, so the format spells it as 0, and that is what goes into the entry whenever you ask for that size. It looks like a bug when you inspect the file in a hex editor and it is the specification. If you are debugging an icon that some tool refuses, that zero is not the problem.

Nothing crops your 4:3 frame to a square

A phone photograph is 4:3 or 3:2, and an icon is square. This conversion scales the picture down and centres it; it does not crop it. A 4,032 by 3,024 source is drawn across three quarters of each square entry with transparency filling the rest, which is a legal ICO and an undistorted one — and a quarter of the icon spent on nothing.

So crop first. Square the HEIF in whatever the phone or the computer offers, choose the crop for what will be legible when it is one twelfth of that size, and convert afterwards. At 16 pixels the difference between a picture that fills the square and one that fills three quarters of it is four rows of pixels out of sixteen, which is most of what you had. It takes a minute and it is the difference between an icon that reads and one that does not.

Three sizes in the file, and why that does not rescue a photograph

The reason ICO is a container at all is that it can hold several images and let the system pick the one closest to the size it needs. A traditional favicon.ico carries 16, 32 and 48 pixel versions in one file, each drawn or tuned for that scale. This pair writes that set, and the "Icon sizes" control will extend it to 256 or reduce it to one entry.

Take the improvement for what it is. Three entries mean nothing downstream has to resample your icon at draw time, which is a real gain on a mark and a marginal one on a photograph — because the problem at 16 pixels was never that the resampling was done badly, it is that there is no photograph which survives being sixteen pixels wide. The set is drawn from the same picture at three scales; it is a better container around the same difficulty.

Transparency is possible and your photograph does not have any

Because the payload is a PNG, the icon can carry a full alpha channel, and a source with a cleared background arrives with it intact. Icons benefit enormously from that: a shape on transparency sits correctly on a dark taskbar and a light browser tab alike.

A HEIF from a camera is a rectangle of opaque pixels, so what you get is a rectangle, and on a dark browser theme or a dark taskbar that rectangle announces itself as a bright square in a row of shapes. Nothing here removes a background, and an automatic cut-out is not something a format converter should be guessing at. If the icon needs to be a shape rather than a square, that work happens in an image editor before this page.

What to do when the photograph is the brand

Sometimes there genuinely is no drawn mark: a small business, a personal site, a product that exists only as an object somebody photographed. The workable approach is to stop trying to represent the whole picture and pick one element — the shape of the bottle, the animal's head, the colour of the door — then crop tightly to it.

Test it honestly. Convert, then look at the icon at its real size in a browser tab next to a dozen others, not zoomed in a preview. If you cannot tell yours from its neighbours at a glance, the crop is not tight enough, and no amount of resolution will fix that. Raising the contrast and simplifying the background before converting buys more legibility at 16 pixels than any other change you can make, because at that size the only information that survives is the difference between light and dark areas.

The picture is decoded and re-encoded, so nothing else travels

The HEIF is decoded to pixels, scaled and encoded as a PNG once for each size, and the results are wrapped in the icon container. Nothing of the original file structure survives that, so the ICO holds no EXIF, no capture time, no camera model and no GPS coordinates. Nothing was filtered out on purpose; there is simply no path for a metadata block to cross a decode and two re-encodes.

Icons are among the most widely distributed files on a website — every visitor fetches the favicon — so this is a good default rather than a limitation. It also means the file is small in a way that has nothing to do with the picture: an icon is a few kilobytes, and there is no hidden payload inflating it.

Converted in the tab, with the original left intact

The decoder and both encoders run inside this page on your own machine, so no photograph is uploaded and no account is needed. Files up to 100 MB each are accepted, which for a source that ends up as 256 pixels is a limit you will never meet.

Keep the HEIF, because this site can read that format and cannot write it — the decoder is licensed in a way a static site can honour and no encoder is. More practically, you will want to crop and convert again once you have seen the icon at its real size, and the original is what you go back to.

What a phone photograph brings that hurts an icon most

Two properties of modern phone photography work directly against the job. The first is shallow depth of field: portrait and close-up modes blur the background deliberately, and a blurred background scaled to 32 pixels is an undifferentiated smear that competes with the subject instead of separating from it.

The second is tonal subtlety. Phone processing produces pleasing, low-contrast images with detail in the shadows — exactly the opposite of what survives extreme downscaling. Icons work on hard contrast between two or three areas. If you must use a photograph, choose one shot flat against a plain background, and expect to increase the contrast before converting.

App icons are a different job from an ICO file

ICO is a Windows and browser format: shortcuts, the taskbar, the tab strip, favicon.ico at the root of a site. If what you actually need is an icon for a mobile app, a desktop app bundle or a web app manifest, those systems want PNGs at specific sizes with transparency, and they will not accept an ICO at all.

The distinction saves a lot of wasted effort. A web app manifest wants a set of square PNGs, typically at 192 and 512 pixels, and a browser tab wants the ICO. Those are separate deliverables from the same artwork, and the artwork is the part worth investing in — which brings the recommendation back round to drawing a mark rather than shrinking a photograph.

How to build an ICO file from a HEIF image

  1. Crop the HEIF to a square, tightly, around one recognisable element.
  2. Drop it here and let it convert — 16, 32 and 48 pixels in one ICO.
  3. Look at the icon at its real size in a browser tab before you ship it.

HEIF against ICO: a 12-megapixel photo in a 256-pixel box

HEIF compared with ICO
HEIFICO
Full nameHigh Efficiency Image File FormatWindows Icon
File extension.heif.ico
Media typeimage/heifimage/x-icon
CompressionLossy — file size is bought with qualityLossless — nothing is discarded
First published20151985
Published byMPEGMicrosoft
SpecificationISO/IEC 23008-12
LicensingPublished, not standardisedPublished, not standardised
Standing todayCurrentNiche
Bit depth108
Colour it can describeYCbCr, wide gamutRGB, indexed palette
Largest image256 px per side
Opens in a browserSome browsersEvery browser
Considered insteadJPG, AVIFPNG, SVG

What is lost

ICO holds one page. A multi-page HEIF converts a page at a time rather than in one file.

HEIF carries up to 10 bits per channel and ICO stores 8. The extra precision is what survives heavy correction without banding, so the conversion is best made after the editing rather than before it.

What survives

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

Opening the result

ICO opens in every current browser. HEIF has narrower browser support than that. If the file is going onto a web page or into a form, that is usually the whole reason for the conversion.

File size and quality

The result is larger than the original and no better. HEIF has already discarded detail, and ICO stores what is left without discarding more — it prevents further loss rather than undoing the first one.

What each format is for

The two are aimed at different work: HEIF at phones and photography, ICO at the web. That is worth weighing before converting, because the reason one exists is usually the reason the other is awkward.

HEIF is MPEG's format, published in 2015. It records 10 bits per channel.

ICO comes from Microsoft and dates from 1985. GIMP and IcoFX all read it.

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

HEIF to ICO: sizes, cropping and what icons need

Are my HEIF files uploaded anywhere?

No. This conversion runs entirely inside your browser, so the file never leaves your device. You can confirm it yourself: open the network tab of your browser's developer tools and convert something. You will see the page load, plus the analytics and advertising the site is paid for with — and nothing carrying your file. The engine behind this particular pair is libheif, the reference decoder for Apple's HEIC; your browser fetches it once and caches it.

What does the ICO actually contain?

A PNG per size, each behind its own directory entry: three by default, at 48, 32 and 16 pixels, and never more than 256. Windows has read PNG payloads inside ICO files since Vista, and the result is a fraction of the size of the old raw-bitmap form.

Does it produce the 16, 32 and 48 pixel sizes?

Yes — that is the default set, and each is a real image rather than something the browser derives at draw time. It does not make a photograph work at 16 pixels, though. Three reductions of an unreadable picture are three unreadable pictures.

Why is my icon letterboxed?

Because your photograph is not square and the icon is. A 4:3 picture is centred at the largest scale that fits, with transparency filling the bands above and below — the conversion scales and pads, it does not crop. Crop the HEIF to a square before converting and the mark gets the whole frame.

Will the photograph be recognisable at 16 pixels?

Almost certainly not. Sixteen pixels across is enough for two or three shapes and one or two colours. Faces, buildings and scenery all reduce to a smear at that size, which is why icons are drawn rather than photographed.

Does the icon have a transparent background?

Only if the source had one, and a phone photograph does not. The PNG inside the ICO can carry an alpha channel, so transparency in the source survives, but nothing here removes a background for you.

What should I do instead?

Use a drawn mark — a letter, a simple silhouette, a logo — and convert it from SVG or PNG. If the photograph is the brand, crop hard to one distinctive element and accept that the icon is a colour and a shape rather than a picture.

More about these formats