Tauri has a built-in CLI command that can generate all required icons from your SVG file. Here's how to do it:
Run the following command from your project directory, pointing to your SVG file:12
npm run tauri icon ./path/to/your-icon.svgOr with other package managers:
yarn tauri icon ./your-icon.svg
pnpm tauri icon ./your-icon.svg
cargo tauri icon ./your-icon.svgThe command automatically creates all icons needed for different platforms and places them in src-tauri/icons/ by default:31
- Windows:
icon.ico - macOS:
icon.icns - Linux/General: Multiple PNG sizes (
32x32.png,128x128.png,128x128@2x.png,icon.png) - Mobile: Icons placed directly into Xcode and Android Studio projects1
The generated icons are automatically referenced in your tauri.conf.json under the bundle section:4
"bundle": {
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
]
}- For best results, ensure your SVG has equal width and height (square aspect ratio)5
- If you want icons output to a different directory, use the
-oflag:tauri icon ./icon.svg -o ./custom-folder3 6789101112131415
Use a 1024×1024 pixel square SVG as your source file. The tauri icon command will automatically scale it down to generate all the required sizes (32, 128, 256, 512 pixels, etc.).1617
- Square aspect ratio — width must equal height1816
- RGBA format — include transparency (alpha channel)18
- 32-bit color — 8 bits per channel16
Do NOT add rounded corners to your source icon. Here's the platform-specific guidance:
| Platform | Corner Handling |
|---|---|
| macOS | The system automatically applies rounded corners that match other UI elements 1920 |
| iOS | System applies rounded corner masking automatically 19 |
| Windows | No rounded corners applied — icons are displayed as-is 21 |
| Linux | Varies by desktop environment; typically no automatic rounding |
Provide a full-bleed square image and let each OS handle masking. If you bake in rounded corners, they may look wrong when the OS applies its own rounding on top, or appear inconsistent on Windows/Linux.19
- Keep important content away from the edges (use roughly 80% of the canvas for the main graphic) to account for macOS/iOS corner clipping22
- Ensure good contrast on both light and dark backgrounds22
- Avoid small text or fine details — icons are often displayed at 32px or smaller23
- Apple provides official icon templates at Apple Design Resources if you want to preview how your icon will look with system masking24 252627282930
Footnotes
-
https://favicon.im/blog/favicon-electron-tauri-desktop-app-branding ↩
-
https://stackoverflow.com/questions/72476337/how-to-create-icons-with-tauricon ↩
-
https://stackoverflow.com/questions/78324346/is-there-a-correct-way-to-set-the-icons-for-my-tauri-application ↩
-
https://hexmos.com/freedevtools/svg_icons/tauri/tauri-original/ ↩
-
https://iconbuddy.com/material-icon-theme/folder-src-tauri-open ↩
-
https://dev.to/rain9/tauri5-tray-icon-implementation-and-event-handling-5d1e ↩
-
https://developer.apple.com/design/human-interface-guidelines/app-icons ↩ ↩2 ↩3
-
https://learn.microsoft.com/en-us/windows/apps/design/style/iconography/app-icon-construction ↩
-
https://learn.microsoft.com/en-us/windows/apps/design/style/iconography/app-icon-design ↩ ↩2
-
https://blog.icons8.com/articles/choosing-the-right-size-and-format-for-icons/ ↩
-
https://stackoverflow.com/questions/67466848/following-apples-app-icon-guidelines-wont-give-corner-radius-to-macos-app-icon ↩
-
https://favicon.im/blog/favicon-electron-tauri-desktop-app-branding ↩
-
https://www.reddit.com/r/iOSProgramming/comments/1ajqk3i/whats_the_apple_proprietary_corner_radiusratio/ ↩

The error you're encountering is related to app icon creation during the Tauri bundling process. The build fails with:
Root Cause
Tauri cannot determine the format of your app icon file, which typically means the icon file is either missing, corrupted, or in an unsupported format.
Solutions
Check Your Icon Configuration
Verify icon file exists and is valid
src-tauri/tauri.conf.json(ortauri.conf.json)bundle.iconsectionUse the correct icon format
"icon": ["icons/icon.png"]Regenerate your icons
Manual icon setup
src-tauri/icons/icon.pngtauri.conf.json:Quick fix: If you just need to test the build, create a simple temporary icon:
tauri.conf.jsonThe build should succeed once Tauri can locate and properly read your icon file.