New: SEO Blog Writer, a readable, checked blog post for your site every week. Pay once, download straight away.

See it
AI Skill Up
Browse skills

App icons for Electron and Tauri: .icns, .ico and PNG

Desktop apps need an icon file per platform: .icns for macOS, .ico for Windows, PNG for Linux. Where Electron and Tauri expect them, and how to make the set.

Mobile stores tell you exactly what they want. Desktop app tooling is looser, and the usual result is a default Electron or Tauri logo in someone's Dock because the icon path was wrong. Each platform wants its own format.

The three formats

PlatformFormatContents
macOS.icns16 to 512 points at 1x and 2x, inset shape and shadow
Windows.icoSeveral sizes in one file: 16, 24, 32, 48, 64, 128, 256
Linux.png512 or 1024 square

The Mac icon is not the same artwork as the Windows one: macOS expects the rounded body inset in the canvas with a shadow, while Windows icons usually fill more of the square. See the macOS app icon shape.

Tauri

npm run tauri icon ./app-icon.png
# writes src-tauri/icons/: icon.icns, icon.ico, PNGs and more

The source should be square and at least 1024 pixels, with transparency. tauri.conf.json lists the generated files under bundle.icon.

Electron

  • electron-builder: put icon.icns, icon.ico and icon.png in the build/ folder, or set mac.icon, win.icon and linux.icon in its config.
  • Electron Forge: set packagerConfig.icon to a path without an extension, such as assets/icon, and provide assets/icon.icns and assets/icon.ico.
  • Window icon on Linux and Windows during development: pass icon to BrowserWindow.

Check after packaging

Icons are cached aggressively by macOS and Windows. After replacing one, rebuild and test on a clean install, or the old icon can linger in the Dock or taskbar. The app should also look native once it opens; a native macOS look in Tauri and Electron covers the window itself.

App Icon Foundry exports a macOS icon with the correct inset shape alongside the other platforms' files, from one design, ready for Tauri's or Electron's tooling to package.

Questions

What icon formats does a desktop app need?

An .icns file for macOS, an .ico file containing several sizes up to 256 pixels for Windows, and PNGs for Linux, typically 512 pixels or larger.

How does Tauri generate icons?

The Tauri CLI has an icon command. Give it a square PNG of at least 1024 pixels, or an SVG, and it writes the platform icons into src-tauri/icons, which tauri.conf.json already points at.

Where does Electron look for the app icon?

It depends on the packager. electron-builder looks in the build folder for icon.icns, icon.ico and icon.png by default; Electron Forge takes a packagerConfig icon path without an extension and picks the right file per platform.

Or skip the afternoonand drop one in.