Apple Touch Icon Documentation
Complete guide to generating, configuring, and deploying Apple touch icons and web app icons for all platforms.
Apple Touch Icons
Generate all required sizes for iPhone, iPad, and Mac Safari.
Multi-Platform
Android, Windows, macOS, iOS β all covered in one config.
Zero Config
Sensible defaults. Works out of the box with one command.
Auto-Conversion
Convert any image format to all required icon sizes.
Build Tools
Plugins for Webpack, Vite, Rollup, and CLI support.
Validation
Check icons against Apple's latest specifications.
Quick Start
Get up and running in under 60 seconds. This guide walks you through generating a complete set of Apple touch icons from a single source image.
Install the package
Run the following command in your project directory:
Place your source image
Place your icon source file (e.g., icon-source.png) in your project root or designated assets folder.
Generate icons
Run the CLI command to generate all icon sizes:
Link icons in HTML
Add the generated HTML link tags to your <head>:
Installation
Install Apple Touch Icon Generator using your preferred package manager:
System Requirements
| Requirement | Minimum | Recommended |
|---|---|---|
| Node.js | 18.0.0 | 20 LTS |
| npm | 9.0 | 10.x |
| Source Image | 512Γ512 PNG | 1024Γ1024 PNG or SVG |
| Disk Space | 10 MB | 50 MB |
Configuration
Customize icon generation behavior using a configuration file or programmatic API.
Configuration File
Create an appletouch.config.js file in your project root:
Configuration Options
Path to the source image file. Supports .png, .svg, .webp, and .ico formats.
Output directory for generated icons. Defaults to ./icons.
Target platforms. Available: apple, android, web, windows, firefox. Defaults to all.
Output image quality (1-100). Defaults to 95. Only applies to PNG/JPEG output.
Auto-trim transparent edges from source image. Defaults to false.
Apply rounded corners to match Apple's icon guidelines. Defaults to false.
Auto-generate <link> tags as a icons.html fragment. Defaults to true.
Supported Formats
Apple Touch Icon Generator supports a wide range of input and output formats to cover every platform requirement.
Input Formats
| Format | Extension | Vector | Notes |
|---|---|---|---|
| PNG | .png |
No | Recommended. Supports transparency. |
| SVG | .svg |
Yes | Best quality for scaling. |
| WebP | .webp |
No | Lossless mode recommended. |
| ICO | .ico |
No | Legacy Windows format. |
Output Formats
| Platform | Format | File Pattern |
|---|---|---|
| iOS / macOS | PNG | apple-touch-icon-{size}.png |
| Android | PNG | android-icon-{size}.png |
| Web Favicon | ICO / PNG | favicon.ico, favicon-32x32.png |
| Windows | MSE / ICO | mstile-{size}.png |
| Firefox | PNG | firefox-icon.png |
Icon Sizes
Here are all the icon sizes generated by default for each platform. You can customize these in your configuration.
Apple Touch Icon Sizes
| Size | Device | File Name | Ratio |
|---|---|---|---|
180Γ180 |
iPhone (iOS 7+) | apple-touch-icon.png | @3x |
167Γ167 |
iPad Pro (12.9") | apple-touch-icon-167x167.png | @3x |
152Γ152 |
iPad (iOS 7+) | apple-touch-icon-152x152.png | @2x |
120Γ120 |
iPhone Retina | apple-touch-icon-120x120.png | @2x |
76Γ76 |
iPad (legacy) | apple-touch-icon-76x76.png | @1x |
@2x and @3x resolution. If only one size is available, use 180Γ180 as it will be scaled down appropriately.Android Icon Sizes
| Size | Purpose | Density |
|---|---|---|
192Γ192 | Launcher icon | xdpi |
512Γ512 | Play Store | β |
Web Favicon Sizes
| Size | Purpose | Format |
|---|---|---|
16Γ16 | Tab favicon | ICO / PNG |
32Γ32 | Tab favicon (retina) | ICO / PNG |
180Γ180 | Apple touch fallback | PNG |
Apple Specifications
Apple's Human Interface Guidelines specify precise requirements for touch icons. This section summarizes the key requirements.
Design Requirements
- Do not apply rounded corners, drop shadows, or gloss effects β iOS adds these automatically.
- Use a square canvas with equal dimensions.
- Keep important visual elements within a central safe area to prevent clipping.
- Use PNG format with 8-bit or 16-bit color depth.
- Avoid transparency in the icon itself β use solid background colors.
HTML Link Tag Format
apple-touch-icon-precomposed if you've manually applied effects like rounded corners or shadows to your icon.API Reference β Overview
The Apple Touch Icon API provides a RESTful interface for programmatic icon generation, conversion, and validation.
Base URL
Authentication
All API requests require an API key passed via the Authorization header:
Rate Limits
| Plan | Requests / min | Max file size |
|---|---|---|
| Free | 60 | 2 MB |
| Pro | 600 | 10 MB |
| Enterprise | Unlimited | 50 MB |
Generate Icons
Generate a complete set of icons from a source image.
Endpoint
Request Body
Response
Convert Icons
Convert an existing icon to different formats and sizes.
Validate Icons
Check if your icons meet Apple's current specifications.
CLI Tool
Generate icons directly from the command line.
Commands
| Command | Description |
|---|---|
appletouch generate [options] | Generate icons from source image |
appletouch validate [path] | Validate existing icon set |
appletouch convert [input] [output] | Convert icon format/size |
appletouch init | Create default config file |
appletouch watch [options] | Watch for source changes and regenerate |
Generate Options
| Flag | Shorthand | Description |
|---|---|---|
--source, -s | -s | Source image path |
--output, -o | -o | Output directory |
--platforms, -p | -p | Comma-separated platforms |
--config, -c | -c | Config file path |
--watch, -w | -w | Watch for changes |
--verbose, -v | -v | Verbose output |
Examples
Frequently Asked Questions
We recommend a minimum of 512Γ512 pixels for your source image. For best results across all platforms (including high-DPI displays), use 1024Γ1024 or larger. SVG files are ideal since they scale to any resolution without quality loss.
No. Apple's iOS automatically applies rounded corners, drop shadows, and gloss effects to touch icons. You should provide a square icon with no effects applied. If you manually apply effects, use the precomposed variant of the link tag.
Yes! SVG is actually the best source format because it scales to any resolution without quality loss. Our tool rasterizes SVGs at each required size automatically.
Simply run the generate command again with your updated source image. The tool will overwrite existing files. For production sites, add cache-busting query parameters or versioned filenames to ensure browsers fetch the updated icons.
Common issues include: (1) The icon file path is incorrect or inaccessible, (2) Missing the rel="apple-touch-icon" attribute, (3) The icon has a non-PNG format, (4) Server MIME type is incorrect. Use our validate command to check for common issues.
Troubleshooting
Common Errors
Cause: Your source image is smaller than the smallest output size (16Γ16px).
Fix: Use a larger source image (minimum 512Γ512 recommended).
Cause: The source file format is not supported.
Fix: Convert your source to PNG, SVG, WebP, or ICO format.
Cause: The output directory doesn't exist or lacks write permissions.
Fix: Create the output directory manually or use --force flag.
Changelog
v3.2.0
January 15, 2025- NEW Added WebP output format support
- NEW CLI
watchmode for automatic regeneration - FIX Resolved SVG rasterization artifacts on high-DPI outputs
- FIX Corrected iPad Pro 12.9" icon size from 167β192
v3.1.0
December 1, 2024- NEW Batch API endpoint for bulk icon generation
- NEW Webhook support for async job notifications
- BREAKING Minimum Node.js version bumped to 18
- BUG Fixed memory leak in watch mode
v3.0.0
October 15, 2024- NEW Complete rewrite with improved performance (3x faster)
- NEW New configuration file format (appletouch.config.js)
- NEW Vite plugin support
- BREAKING Removed deprecated
--sizesflag, use config instead
License
Apple Touch Icon Generator is released under the MIT License.