You've built a Tauri app, but the default icon still shows in the taskbar. Or maybe you're about to ship and realize the dock icon is a generic placeholder. Setting a proper Tauri app icon is straightforward once you know where the files go and how the config references them. This guide walks you through the exact steps for Windows, macOS, and Linux, using Tauri's built-in icon generator and the tauri.conf.json configuration.

Prerequisites

Before you start, make sure you have:

If you need a high-quality source icon, you can create one from your existing logo or favicon using Mzu favicondl — it exports clean PNGs at multiple sizes.

Step 1: Generate the icon set

Tauri provides a CLI command that takes a single source image and produces all the platform-specific formats: .ico for Windows, .icns for macOS, and various PNGs for Linux and mobile. Run this from your project root:

npm run tauri icon path/to/your-icon.png

If you're using Tauri v1, the command is npm run tauri icon as well, but check your package.json scripts. The generator writes files into src-tauri/icons/ by default. You'll see files like 32x32.png, 128x128.png, icon.icns, and icon.ico.

Tip: The source image should have a transparent background and a clear silhouette. Avoid text or fine details — they won't survive at 16×16 or 32×32. For design guidance, see our favicon design tips (the same principles apply to app icons).

Step 2: Configure tauri.conf.json

Open src-tauri/tauri.conf.json and locate the bundle section. Under icon, list the paths to the generated icons. Tauri v2 uses a slightly different structure than v1, but the concept is the same.

For Tauri v2:

{
  "bundle": {
    "icon": [
      "icons/32x32.png",
      "icons/128x128.png",
      "icons/[email protected]",
      "icons/icon.icns",
      "icons/icon.ico"
    ]
  }
}

For Tauri v1, the icon array sits under tauri.bundle:

{
  "tauri": {
    "bundle": {
      "icon": [
        "icons/32x32.png",
        "icons/128x128.png",
        "icons/icon.icns",
        "icons/icon.ico"
      ]
    }
  }
}

Make sure the paths are relative to src-tauri/. If you moved the icons elsewhere, update the paths accordingly.

Step 3: Verify platform-specific behavior

Each OS uses a different file from the list. Here's what matters:

If you're building for mobile (iOS/Android), the generator also creates appropriate assets, but those are outside the scope of this guide.

Step 4: Rebuild and test

After updating the config, rebuild your app:

npm run tauri build

Then install or run the built executable. Check the taskbar (Windows), dock (macOS), or application menu (Linux) to confirm the icon appears. On Windows, you may need to clear the icon cache if the old icon persists — a known quirk. For macOS, sometimes the dock caches icons; logging out and back in resolves it.

Common pitfalls

Conclusion

Setting a Tauri app icon is a three-step process: generate the icon set with tauri icon, reference the files in tauri.conf.json, and rebuild. The built-in generator saves you from manually creating ICO and ICNS files. Keep your source image simple and square, and verify the icon on each target platform. For more on icon formats and best practices, explore our favicon best practices — many principles carry over to app icons.

Check the documented requirements

The HTML Standard defines rel='icon' as the link relationship for an icon representing the current page.