How to Make an ICO File

An ICO file is the Windows icon format: one file that holds the same icon at several sizes. This guide covers what is inside one, which sizes to include, how to make one from a PNG in your browser, and how to use it on Windows 11 and on a Mac.

Updated

Convert a PNG to ICO

What an ICO file is

An ICO file holds several images of one icon, typically at 16, 32, 48 and 256 px, so that Windows can show a sharp copy wherever the icon appears: 16 px in a list of files, 48 px on the desktop, 256 px in the Extra large icons view. Each image is made for its size, which avoids the loss of quality from scaling one image up or down.

The file starts with a short directory: how many images it holds and, for each one, its width, height, length in bytes and position in the file. Then come the images, each either a bitmap (the colors plus a 1-bit mask that marks transparent pixels) or, since Windows Vista, a PNG. A 32-bit image also has an alpha channel, which gives every pixel its own level of transparency; Windows XP introduced these.

Microsoft's guidelines give 256 × 256 px as the largest icon size and ask for only the 256 px image to be compressed; the compression Windows Vista added is PNG. Renaming logo.png to logo.ico does not make an icon: it adds no directory, so the file is still a PNG.

Which sizes to put in it

Microsoft's guide to Windows app icons asks for at least 16, 24, 32, 48 and 256 px. Windows looks for an exact size first, then takes the next larger one and scales it down, so a file with a 256 px image is only ever scaled down. File Explorer and the desktop use these sizes, which grow with the display scale set in Windows:

Where the icon appears100% scale150%200%
Details and list views, title bar16 px24 px32 px
Medium icons view32 px48 px64 px
Large icons view, desktop48 px72 px96 px
Extra large icons view256 px256 px256 px

A size the file does not hold, such as 72 px, is scaled down from the next size up.

Make an ICO file from a PNG

The PNG to ICO converter on this site runs in your browser, so there is nothing to install and your image is not uploaded (how it works). Start from a square PNG of at least 256 × 256 px, with a transparent background if the icon should have one.

  1. Open the converter and drop the PNG on the square, choose it from your device, or paste it.
  2. Press Windows icon to tick 16, 24, 32, 48, 64, 128 and 256 px.
  3. If the image is not square, choose Fit (transparent space around it) or Crop to square (the center square).
  4. Look at each tile, which shows that size at its real pixels. If 16 or 32 px is unclear, press Use another image for this size on its tile and give it a simpler image.
  5. Press Download ICO. The line under the button gives the size of the file, how many images it holds and its smallest and largest size.

For a photo, use JPG to ICO; for a website, the Favicon Generator.

Use the ICO on a Windows 11 folder

The way Microsoft documents to give a folder its own icon is a small settings file named desktop.ini inside the folder. Microsoft's page names .ico as the preferred icon file.

  1. Save the ICO in the folder, for example as folder.ico.
  2. In a text editor such as Notepad, write these three lines, one per line: [.ShellClassInfo], IconFile=folder.ico and IconIndex=0. Save the file in the same folder as desktop.ini, with Unicode encoding, which Microsoft's page asks for.
  3. In Command Prompt, go to that folder and run attrib +h +s desktop.ini to mark the file as hidden and system.
  4. In the folder above it, run attrib +s "Folder name" with the name of your folder. This makes it a system folder, which tells Windows to read its desktop.ini.

Microsoft's page says the custom icon then replaces the folder icon everywhere the folder name appears.

Since the Windows security updates of June 9, 2026, Windows ignores a desktop.ini it cannot trust. Microsoft's examples are files downloaded from the internet, files copied from some remote locations, and files on network paths outside the trusted zones. A desktop.ini you write on your own PC is none of these.

Desktop and shortcut icons on Windows 11

For the icons Windows itself puts on the desktop (This PC, Recycle Bin, Network and your user folder), Microsoft's page on desktop icons starts at Settings > Personalization > Themes > Desktop icon settings. If you change these icons, untick Allow themes to change desktop icons there, so that a new theme leaves them alone.

Microsoft's current Windows support pages give no steps for changing the icon of a shortcut, so this guide does not list any.

On a Mac

Making the ICO on a Mac works as on Windows: open the converter in Safari, Chrome or Firefox and download the file. You need one there only when the icon is for Windows or a website.

A Mac does not need an ICO for its own files and folders. Apple's steps for a custom icon take any picture you can copy, so use the PNG you started from:

  1. Double-click the PNG to open it in Preview.
  2. Choose Edit > Copy.
  3. Select the file or folder whose icon you want to replace, then choose File > Get Info.
  4. In the Info window, click the small icon at the top, below the title bar, then choose Edit > Paste.

If Edit > Paste is not available, you may have clicked the large icon under Preview in the Info window instead. To go back to the original icon, select the small icon in the Info window and choose Edit > Cut.

Frequently asked questions

What is an ICO file?

The Windows icon format: one file holding the same icon at several sizes, such as 16, 32, 48 and 256 px. Each image inside is stored as a bitmap or, since Windows Vista, as a PNG.

Is an ICO file always a PNG image?

No. The images inside an ICO can be bitmaps or PNGs, and one file can mix both. The converter on this site stores the sizes under 256 px as bitmaps and the 256 px size as a PNG, unless you tick Smaller file, which stores every size as a PNG.