HTML Snippet
Paste into your <head> tag
<!-- Generated by Favset — favicon.tools --><!-- ICO fallback for legacy browsers --><link rel="icon" type="image/x-icon" href="/favicon.ico"><!-- SVG favicons with dark mode support --><link rel="icon" type="image/svg+xml" href="/favicon.svg"media="(prefers-color-scheme: light)"><link rel="icon" type="image/svg+xml" href="/favicon-dark.svg"media="(prefers-color-scheme: dark)"><!-- Apple Touch Icon --><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><!-- Android Chrome Icons --><link rel="icon" type="image/png" sizes="192x192" href="/icon-192.png"><link rel="icon" type="image/png" sizes="512x512" href="/icon-512.png"><!-- PWA Manifest --><link rel="manifest" href="/site.webmanifest">
Upload or create a favicon first
Favicon HTML, manifest, and SVG templates by site type
Above this section, the tool generates a favicon package from an image, text, or emoji input. Below: the copy-paste templates that go into your repository, grouped by the kind of site you are shipping. Head snippets, a webmanifest shell, and the SVG color-override pattern.
Pick the template that matches the site
| Site type | Use template | Files you need | Notable omissions |
|---|---|---|---|
| Marketing or docs site (no install prompt) | Modern minimal | ico + svg + apple-touch | No webmanifest, no Android icons |
| Web app or SaaS (full PWA install) | PWA-complete | ico + svg + 192/512 png + apple-touch + webmanifest | None; this is the full kit |
| Legacy support (IE11, older mobile) | Legacy-safe | ico + 16/32/96 png + apple-touch | No SVG, no manifest |
| Internal tool or staging | Bare | ico only | Everything else |
| Heavy iOS PWA usage | Apple-first | ico + svg + apple-touch + apple-mobile meta | Skip Android-specific tags |
The grid covers the four shipping shapes that account for roughly 95% of favicon installs. The fifth row exists because Apple's PWA stack still ignores the webmanifest for splash and home-screen styling, so iOS-leaning teams configure things differently than Android-leaning teams.
Modern minimal head
For sites that don't need a PWA install prompt but do want the dark-mode SVG flip:
<link rel="icon" href="/favicon.ico" sizes="32x32">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">Three lines. The browser picks the SVG when it can, falls back to ICO at the 32 px frame for legacy clients, and serves the 180 px PNG to iOS Safari. No sizes attribute on the SVG line. Browsers ignore it for vector formats and warn in DevTools when you set it.
PWA-complete head
For a web app you want Android and Chrome desktop to offer install prompts for:
<link rel="icon" href="/favicon.ico" sizes="32x32">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="manifest" href="/site.webmanifest">
<meta name="theme-color" content="#0C0B0A" media="(prefers-color-scheme: dark)">
<meta name="theme-color" content="#F4F1EC" media="(prefers-color-scheme: light)">The theme-color pair is what colors the Chrome address bar and the Android task switcher; paired with media it switches with the OS. Without the media-query pair, you pick one color and live with it across both themes.
Legacy-safe head (no SVG)
For shipping to enterprise users on locked browsers that don't parse image/svg+xml favicons (Safari before 16.4, IE11 webview, some embedded WebKits):
<link rel="icon" href="/favicon.ico" sizes="32x32">
<link rel="icon" href="/favicon-16x16.png" sizes="16x16" type="image/png">
<link rel="icon" href="/favicon-32x32.png" sizes="32x32" type="image/png">
<link rel="icon" href="/favicon-96x96.png" sizes="96x96" type="image/png">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">Drop the SVG line and explicitly enumerate the PNG sizes the browser should choose between. Older Chromes and Firefoxes that didn't pick the right resolution from a single ICO with multiple frames will read the sizes attribute and pick correctly.
Apple-first head
For products with heavy iOS PWA usage. The iOS Add-to-Home-Screen path does not respect the webmanifest for icon, splash, or status-bar styling:
<link rel="icon" href="/favicon.ico" sizes="32x32">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="apple-touch-icon" href="/apple-touch-icon-152x152.png" sizes="152x152">
<link rel="apple-touch-icon" href="/apple-touch-icon-167x167.png" sizes="167x167">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="YourApp">The three apple-touch-icon sizes target iPhone (180 px, default), iPad (152 px), and iPad Pro (167 px). Apple's home-screen tile rounding is automatic; do not pre-round your PNG.
site.webmanifest
A spec-correct manifest for the PWA-complete template above:
{
"name": "Your App",
"short_name": "App",
"icons": [
{
"src": "/android-chrome-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any maskable"
},
{
"src": "/android-chrome-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any maskable"
}
],
"theme_color": "#0C0B0A",
"background_color": "#F4F1EC",
"display": "standalone",
"start_url": "/"
}purpose: "any maskable"lets Android use the same PNG for both the legacy badge style and the adaptive-icon style. The 192 px asset must keep its glyph inside a 102 × 102 px safe zone (53% of the canvas) so the circular and squircle masks don't crop it.theme_colorhere is the install-prompt color. The runtime address-bar color comes from the <meta name="theme-color"> tag, not the manifest.start_urlshould be the URL you want the installed app to open at, usually /, sometimes /?source=pwa for analytics tagging.
SVG color-override
The single-SVG dark-mode pattern, distilled to the minimum that works:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<style>
.fg { fill: #0C0B0A; }
@media (prefers-color-scheme: dark) {
.fg { fill: #BFFF00; }
}
</style>
<path class="fg" d="...your glyph path..." />
</svg>The <style> block must live inside the SVG, not in an external stylesheet. Favicon SVGs load with restricted permissions and external CSS does not apply. Avoid <image>, <script>, and external <font> references inside the favicon SVG for the same reason.
Link tag attribute reference
| Attribute | Used on | Value rules |
|---|---|---|
rel | every favicon link | icon, apple-touch-icon, manifest (and historically mask-icon, deprecated) |
type | rel="icon" lines | image/svg+xml, image/png, or image/x-icon for ICO |
sizes | png and ico links | Single value like 32x32, or any for ICO when it contains multiple frames |
href | every link | Absolute or root-relative path; do not use protocol-less // for favicons (some crawlers won't resolve it) |
media | dark-mode theme-color meta only | (prefers-color-scheme: light) or (prefers-color-scheme: dark) |
Webmanifest field reference
| Field | Required | Purpose |
|---|---|---|
name | Yes | Full app name shown on the install prompt and home-screen long-press |
short_name | Yes | Truncated label under the home-screen icon when name is too long |
icons | Yes | Array of icon assets; PWA install minimum is one 192 and one 512 |
theme_color | No | Color used for the install prompt UI; distinct from the head meta tag |
background_color | No | Splash-screen color on Android install (iOS ignores this) |
display | No | standalone (default for PWAs), fullscreen, minimal-ui, or browser |
start_url | No | URL opened when the installed app launches; defaults to the manifest URL |
scope | No | Path restriction for the installed app's navigation; defaults to manifest location |
Vocabulary
- Apple touch icon
- PNG referenced by Safari for iOS Add-to-Home-Screen, the macOS Sidekick app, and as a fallback in some Chromium-based macOS browsers. Always 180 × 180 px for the default size; additional sizes via extra <link rel="apple-touch-icon" sizes="..."> lines.
- Adaptive icon
- Android's per-OEM masked-icon system. Reads from the webmanifest's 192 and 512 PNGs when purpose: "any maskable" is set. The mask shape varies by device (circle on Pixel, squircle on Samsung).
- Theme color
- Two distinct fields with the same name. The <meta name="theme-color"> controls the live browser-chrome color; the manifest's theme_color controls the install-prompt UI.
- Maskable purpose
- An icon flag indicating the asset has a safe zone for OEM masking. Without it, Android's adaptive icon system overlays a static badge rather than masking the icon itself.
- Pinned tab mask icon
- A monochrome SVG previously requested by Safari for pinned tabs. Deprecated in Safari 16; do not ship.
Related concepts
- PWA install criteria:
- the conditions browsers check before showing an install prompt (HTTPS, served manifest, valid 192 and 512 icons, controlled service worker for some platforms).
- Web App Manifest spec:
- W3C specification for the .webmanifest file; current draft adds screenshots, shortcuts, and share_target fields beyond the favicon-only scope.
- Color profiles in PNG:
- Chrome and Firefox honor embedded ICC profiles in favicon PNGs; mismatched profiles between the ICO frame and the SVG can shift the apparent color.
- CSP and favicons:
- img-src 'self' is enough for favicons referenced from the same origin; CDN-hosted favicons need the CDN domain in img-src.
- Browser favicon cache:
- Chrome caches per profile until 7 days or a manual cache clear; Firefox per session; Safari aggressively until force-quit.