Guides › Photos

How to convert PNG to ICNS or ICO on Mac

Updated 3 November 2026 · by Vistaar Studio

Short answer: for a Mac .icns, put PNG copies named icon_16x16.png … icon_512x512@2x.png in a folder called MyIcon.iconset and run iconutil -c icns MyIcon.iconset in Terminal. For a Windows or website .ico, run sips -s format ico icon-32.png --out favicon.ico on a square PNG of 256 pixels or less. Both tools are free and built into macOS. Just want a custom folder icon? You don't need either file: copy the picture and paste it in Get Info.

ICNS is the Mac's icon format: one file holding the same picture at several sizes, so it stays sharp everywhere from a Finder list to the Dock. ICO does the same job on Windows and for website favicons. Below are the built-in ways we tested on macOS Tahoe 26.2, including the limits that tripped us up.

ICNS, ICO or just PNG: which do you need?

You want to…UseBuilt-in way
Change a folder or file icon on your own MacAny image (PNG is fine)Preview › Copy, then Get Info › Paste
Give a Mac app or installer its iconICNS with several sizesiconutil on an .iconset folder
Add a favicon to a websitePNG or SVG, plus favicon.ico for older browserssips -s format ico (one size)
Make a Windows icon (desktop shortcut, program)ICOsips -s format ico (one size)

1. PNG to ICNS with an .iconset folder and iconutil (best)

This is the proper way: it makes a multi-size ICNS just like the ones inside Mac apps. Start from one square PNG of 1024 × 1024 pixels, ideally with a transparent background. Smaller works, but sips will enlarge it to fill the bigger sizes, and enlarged icons look soft.

  1. Put your PNG in a folder and name it icon.png.
  2. Open Terminal, type cd (with a space), drag that folder into the window and press Return.
  3. Paste this and press Return:
mkdir MyIcon.iconset
for s in 16 32 128 256 512; do
  sips -z $s $s icon.png --out MyIcon.iconset/icon_${s}x${s}.png
  sips -z $((s*2)) $((s*2)) icon.png --out MyIcon.iconset/icon_${s}x${s}@2x.png
done
iconutil -c icns MyIcon.iconset

You get MyIcon.icns next to the folder. The loop simply makes the ten files iconutil expects:

File namePixelsFile namePixels
icon_16x16.png16 × 16icon_16x16@2x.png32 × 32
icon_32x32.png32 × 32icon_32x32@2x.png64 × 64
icon_128x128.png128 × 128icon_128x128@2x.png256 × 256
icon_256x256.png256 × 256icon_256x256@2x.png512 × 512
icon_512x512.png512 × 512icon_512x512@2x.png1024 × 1024

Designed the small sizes by hand? Export them with exactly these names and pixel sizes and skip the sips lines. Going the other way also works: iconutil -c iconset MyIcon.icns unpacks any ICNS into PNGs.

2. Quick single-size ICNS or ICO with sips

The built-in sips tool can write both formats directly; sips --formats on our Mac lists com.apple.icns and com.microsoft.ico as Writable. The catch: each file holds only one size, and only standard square sizes work.

sips -z 512 512 icon.png --out icon-512.png
sips -s format icns icon-512.png --out icon.icns

sips -z 32 32 icon.png --out icon-32.png
sips -s format ico icon-32.png --out favicon.ico

A single-size ICNS is fine for a quick test or a personal folder icon. For an app, use the iconset method above so the small sizes in the Finder look crisp.

What we found when we tested it

We ran every command on macOS Tahoe 26.2 with a square PNG logo from this site, enlarged to 1024 × 1024 as a starting point.

TestResult
iconutil -c icns on the full ten-file .iconsetWorked: a 2.4 MB ICNS. Unpacking it gave back all ten sizes, up to 1024 × 1024.
.iconset with only the two 512 filesWorked (1.7 MB ICNS).
.iconset with a file named icon_1024x1024.pngFailed: "Failed to generate ICNS."
500 × 500 image named icon_512x512.pngFailed: "Failed to generate ICNS."
sips -s format icnsWorked at 16, 32, 128, 256 and 512 px. Failed with Error 13 at 64, 100, 1000 and 1024 px and on a non-square image. Unpacking the 512 one showed a single size inside.
sips -s format icoWorked at 16, 32, 48, 64, 128 and 256 px. Failed with Error 13 at 100, 512 and 1024 px and on non-square images. Each file held one icon.

So if sips answers with "Error 13: an unknown error occurred", check the image is square and one of the sizes above before anything else.

3. Preview: possible, but check your Format menu

Preview's File › Export shows a short format list. Apple's guide says to hold ⌥ Option while clicking the Format pop-up to see "specialized or older formats". Preview's own settings mark ICNS as a format it can edit (ICO only as one it can view), so ICNS is the one to look for in that longer list. We didn't confirm that menu on 26.2, or how many sizes such an export holds, so for an app icon use the iconset method.

Put a custom icon on a folder or file

Most people searching for PNG to ICNS really want this, and it needs no conversion at all:

  1. Open the PNG in Preview and choose Edit › Copy.
  2. In the Finder, select the folder or file and choose File › Get Info (⌘ I).
  3. Click the small icon at the top of the Info window, next to the name (not the big preview lower down).
  4. Choose Edit › Paste (⌘ V).

To go back to the normal icon, select that small icon again and choose Edit › Cut. You can't change folders that come with the Mac, such as Applications, Library, System and Users.

Favicons: what a website actually needs

Modern browsers happily use a PNG or SVG favicon linked in your page's <head>, for example <link rel="icon" href="/icon-32.png" type="image/png">. A favicon.ico in the site's root is still worth having for older browsers and tools that ask for that file automatically.

A "classic" favicon.ico packs 16, 32 and 48 pixel versions into one file. sips can't do that: it writes one size per ICO. A single 32 × 32 ICO made with the command above works fine for most sites. If you need the multi-size version, the free, open-source ImageMagick can make it in one line, but it isn't built into macOS: you'd install it first, for example with Homebrew (brew install imagemagick). We haven't run it on this Mac.

magick icon.png -define icon:auto-resize=16,32,48 favicon.ico

Common problems

Convert a whole folder of images: Pictailor

We make this app, so read this part with that in mind. For one icon, the free methods above are all you need. Pictailor is a batch photo resizer, and it can also save copies as ICO or ICNS, for a whole folder at once, without Terminal.

Pictailor on Mac after a batch resize: a list of 31 interior photos on the left, each showing its new size and a saved tick, the Instagram portrait size applied to all of them, and a card saying 31 photos tailored with originals untouched
Pictailor works on a whole folder in one Save.

Pictailor is available now from vistaar.studio for $5 (₹499 in India), paid up front, with a licence key for 1 Mac. It's also on the Mac App Store for $4.99. It runs on Apple Silicon and Intel Macs with macOS 15 or later. Meet Pictailor →

FAQ

Can I convert a PNG to ICNS on a Mac without installing anything?

Yes. Build an .iconset folder and run iconutil -c icns on it. For a quick single-size icon, sips -s format icns works on a 16, 32, 128, 256 or 512 pixel square PNG.

Which sizes go into a Mac .iconset folder?

16, 32, 128, 256 and 512 pixels, each with an @2x version, up to 1024 × 1024. iconutil accepted a folder with only the 512 pair in our test, but rejected wrong names or wrong pixel sizes.

Why does sips say Error 13?

In our tests: the image wasn't square, or wasn't a standard icon size. ICO stops at 256 pixels; ICNS via sips stops at 512.

How do I make a favicon.ico on a Mac?

Resize to 32 × 32 with sips -z, then sips -s format ico. That's a one-size ICO; a multi-size one needs a separate tool such as ImageMagick.

How do I put a custom icon on a folder?

Copy the image in Preview, open Get Info on the folder, click the small icon at the top and paste. Edit › Cut there restores the original.

Can I turn an ICNS file back into PNGs?

Yes: iconutil -c iconset MyIcon.icns gives you a folder of PNGs, one per size.