Skip to content

Free tools › Images

PNG to ICO

One picture, an ICO holding 256, 128, 64, 48, 32 and 16 pixel versions.

More free conversions, where you upload. The Fylane extension does the same work inside any upload form, on its own free share every day.Add to Chrome

How to convert PNG to ICO

  1. Drop the image.
  2. Nothing to choose.
  3. Press Convert and download.

What happens to your file

The picture is fitted inside 256 pixels and ImageMagick writes an ICO holding it at 256, 128, 64, 48, 32 and 16 pixels, each resized with care, transparency kept. That is the file Windows uses for a program icon and browsers for a favicon. A picture that is not square is fitted inside the square, not stretched — start from a square one for the cleanest icon.

Questions

Which sizes does a favicon need?

Browsers pick whichever they want from what the ICO offers: 16 and 32 for tabs, 48 for shortcuts and for what Google Search reads, 256 for Windows tiles. The file this page writes carries all of them, so there is nothing to choose.

Does Google need a particular favicon size?

Google asks for a square icon whose size is a multiple of 48 pixels — 48, 96, 144 and so on — served from the same host and returning a real image content type. The 48-pixel entry in this ICO satisfies it, and Google refreshes what it shows on its own schedule, which can take days.

Should I use an ICO or a PNG favicon?

Both work in modern browsers, and most sites ship both: an ICO at /favicon.ico as the fallback nothing has to be told about, plus a PNG declared in a link tag. If you only want one file, the ICO is the safer choice because it needs no markup at all.

My image is not square. What happens?

It is fitted inside the square rather than stretched, so the proportions survive and the spare space is transparent. Start from something square if you can — an icon that fills its box reads better at 16 pixels.

How would I do this with ImageMagick instead?

One command: convert input.png -define icon:auto-resize=256,128,64,48,32,16 favicon.ico. That is roughly what this page runs. Use the page when you do not want to install anything, and the command when it belongs in a build script.

Will transparency survive?

Yes. The alpha channel is kept at every size, which is what stops the icon showing a white box on a dark browser theme.

Do it once, not on every form

A form that wants a square JPEG under 240 KB says so on the page. The Fylane extension reads that, fits your photo to it, and puts it in the field — without you working out what 240 KB looks like.

And it keeps the result. The next application that asks for a résumé, a cover letter and a photo fills all three from one tap, each one refitted to what that site accepts.

Your files stay in the browser, encrypted, on your machine. Nothing is uploaded to keep them and nothing is sent anywhere to fill a form.

Filmed from the extension: a phone portrait against a form that takes only a square JPEG under 240 KB.

Add to Chrome — freeWhat it does

Do this in code

curl -X POST https://api.fylane.dev/v1/jobs \
  -H "Authorization: Bearer $FYLANE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file_id": "<file id>",
    "operation": "image.convert",
    "options": {
      "format": "ico"
    }
  }'

The same operation, image.convert — Re-encode to WebP, JPEG, PNG or AVIF at your quality. Upload first with the quickstart; every option is on the operations page. 500 free credits a month, then $5 per thousand.