Favicons explained
Which sizes you really need in 2026 and how to generate them
From the original favicon.ico to SVG icons, Apple touch icons and manifest icons for Android: which files still matter, where they go, the HTML to include, and the mistakes that make icons blurry, black or missing.
- By HelpMeJPG editorial team
- Published
- 9 min read
On this page
A favicon is the smallest image on your site and the one seen most often: in every tab, bookmark, history entry, search result and home-screen shortcut. It is also the subject of more outdated advice than almost anything else in front-end work, with generators still producing twenty files for platforms that no longer exist. This guide sets out what the files are for, which still earn their place, and how to produce them without ending up with a blurry or black icon somewhere you did not test.
A short history, because it explains the mess
Internet Explorer 5 introduced the favicon in 1999: a file called favicon.ico in the root of the site, which the browser fetched on its own to decorate bookmarks. The .ico format is a Windows container that can hold several images at different sizes and colour depths, which is why a single favicon.ico traditionally contains 16×16, 32×32 and 48×48 versions.
Other browsers adopted the convention and HTML gained a <link rel="icon"> element so the icon could live anywhere and be any image type. Then each platform added its own requirement: Apple wanted a large, square, opaque icon for the iPhone home screen; Android and Chrome wanted icons declared in a web app manifest; Windows 8 wanted tile images; Safari wanted a monochrome SVG for pinned tabs; Google wanted something that scaled cleanly into search results. Several have since fallen away, so the set you need today is smaller than most generators suggest.
The files that still matter
| File | Size | Declared where | Who uses it |
|---|---|---|---|
favicon.ico |
16, 32 and 48 px in one file | Site root; optionally a <link> |
Older browsers, feed readers and tools that request /favicon.ico blindly |
icon.svg |
Vector | <link rel="icon" type="image/svg+xml"> |
Chromium-based browsers, Firefox and Safari 26 or later; sharp at every size, can adapt to dark mode |
favicon-32x32.png |
32×32 | <link rel="icon" type="image/png" sizes="32x32"> |
Browsers that do not render SVG icons; high-density tabs |
apple-touch-icon.png |
180×180 | <link rel="apple-touch-icon">, also found at the root |
iOS and iPadOS home screen, Safari bookmarks |
icon-192.png, icon-512.png |
192×192 and 512×512 | icons array in the web manifest |
Android home screen, Chrome install prompt, splash screen |
| Maskable variants | 192×192 and 512×512 with "purpose": "maskable" |
Web manifest | Android launchers that cut icons into circles and other shapes |
site.webmanifest |
– | <link rel="manifest"> |
Browsers that support installable web apps |
theme-color |
– | <meta name="theme-color"> |
Browser chrome colour on Android and in Safari |
Everything else – Windows tile images and browserconfig.xml, the many intermediate PNG sizes, the Safari mask-icon – is obsolete or optional. Safari has used ordinary favicons in tabs for years, so the monochrome pinned-tab icon is no longer essential, and apple-touch-icon-precomposed stopped meaning anything when iOS stopped adding gloss to icons.
The classic favicon.ico
Keep it. Browsers still request /favicon.ico from the site root when a page declares no icon, and many non-browser clients – feed readers, link previewers, monitoring tools – request it regardless of the HTML. A missing file means 404 errors in your logs and a blank space in those clients. Put 16, 32 and 48 pixel versions inside it and nothing more; larger sizes belong in PNG.
PNG icons and the sizes attribute
A <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"> element gives the browser an icon with known dimensions so it can choose the best match. One 32×32 PNG covers tabs on ordinary and high-density displays, and the .ico covers 16×16. Make sure the sizes value matches the file's real dimensions.
SVG favicons
An SVG icon is a single file that is crisp at every size and can respond to the user's colour scheme with an embedded style block:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<style>
path { fill: #111; }
@media (prefers-color-scheme: dark) { path { fill: #fff; } }
</style>
<path d="..."/>
</svg>
Chromium-based browsers and Firefox have rendered SVG favicons for years; Safari only gained support in version 26, so earlier Safari releases still need the PNG and .ico fallbacks. Browsers that support SVG use it and the rest fall back without special handling. Declare it with type="image/svg+xml" and, if you like, sizes="any", the HTML specification's way of saying the icon is scalable. Keep the artwork simple: a vector legible at 16 pixels needs the same simplification as a bitmap.
The Apple touch icon
iOS uses a single PNG, and the size to provide is 180×180, the largest Apple has requested; devices needing smaller sizes scale it down themselves. Declare it with <link rel="apple-touch-icon" href="/apple-touch-icon.png"> and keep the file at the site root, because Safari looks for /apple-touch-icon.png there when a page declares none.
Two rules matter here. The icon must be opaque: iOS does not display transparency in home-screen icons and renders transparent areas as black, so give it a solid background that suits your brand. And it must have square corners: iOS applies its own rounded mask, so a pre-rounded icon ends up with a dark sliver in each corner. The transparency guide explains why icons that look fine in a tab go wrong here.
Manifest icons for Android and installable sites
Android and Chrome take their icons from the web app manifest, a small JSON file linked from the page:
{
"name": "Example Site",
"short_name": "Example",
"start_url": "/",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#0f172a",
"icons": [
{ "src": "/icon-192.png", "sizes": "192x192", "type": "image/png" },
{ "src": "/icon-512.png", "sizes": "512x512", "type": "image/png" },
{ "src": "/icon-maskable-192.png", "sizes": "192x192", "type": "image/png", "purpose": "maskable" },
{ "src": "/icon-maskable-512.png", "sizes": "512x512", "type": "image/png", "purpose": "maskable" }
]
}
The 192 pixel icon is used on the home screen, the 512 pixel icon for the splash screen shown while an installed site launches, and Chrome's installability checks expect both. Paths in the src fields are resolved relative to the manifest file's URL, not the page, which catches people who keep the manifest in a sub-folder.
Maskable icons exist because Android launchers crop icons into circles, rounded squares or other shapes chosen by the device maker. A maskable icon must fill its entire canvas with an opaque background, and the Web Application Manifest specification defines the safe zone as a central circle whose diameter is 80 % of the icon's width; anything outside it may be cut off. In practice that means a logo occupying roughly the central 60–70 % of the canvas, with background colour around it. Provide maskable icons as separate files rather than marking one image as both any and maskable, since an icon padded for masking looks undersized when shown unmasked.
theme-color
<meta name="theme-color" content="#0f172a"> colours the browser's own interface – the address bar on Android and the tab bar in Safari – to match your site. It accepts a media attribute, so two elements can set one colour for light mode and another for dark. It is not an icon, but the same brand decision drives both.
Where the files go and the HTML to include
Put favicon.ico and apple-touch-icon.png at the site root, because that is where clients look for them without being told. The remaining files can live anywhere the links point; a flat layout at the root is simplest. Then add the following to the <head> of every page, adjusting paths if yours differ:
<link rel="icon" href="/favicon.ico" sizes="16x16 32x32 48x48" />
<link rel="icon" href="/icon.svg" type="image/svg+xml" sizes="any" />
<link rel="icon" href="/favicon-32x32.png" type="image/png" sizes="32x32" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link rel="manifest" href="/site.webmanifest" />
<meta name="theme-color" content="#0f172a" />
Serve the manifest with the application/manifest+json content type, and note that the old rel="shortcut icon" form is tolerated for historical reasons but rel="icon" is the standard. If your framework generates icon links from one source file, check the rendered HTML rather than assuming.
For search results, Google's guidelines ask for a square icon of at least 8×8 pixels and recommend one larger than 48×48 so it can be rescaled cleanly. The SVG, or a dedicated PNG of 96×96 or more declared with a <link>, satisfies this.
Common mistakes
Blurry small sizes. A detailed logo scaled to 16 pixels becomes a smudge. Design a simplified mark for the small sizes – a single letter, a bold shape, no thin strokes or small text – and judge it at real pixel size, not zoomed in. The favicon generator previews every size at actual dimensions for this reason.
Transparent Apple icons. The mark that looks elegant as a transparent tab icon appears on a black square on an iPhone. Always give the Apple touch icon and the maskable icons a solid background.
Forgetting the manifest. Without it, Android builds a home-screen shortcut from whatever icon it can find, often the 32 pixel favicon scaled up, and Chrome's install prompt never appears.
Stale caches. Browsers cache favicons aggressively and may show an old icon for weeks. When you change the icon, change the file names too, or add a version query string to the links.
Declaring sizes that are not true. A file named favicon-32x32.png that is actually 64 pixels wide, or a sizes attribute that contradicts the file, misleads the browser's choice. Check real dimensions with the dimensions checker.
Poor source files. Favicons are square and need resolution to spare. Crop or pad a rectangular logo to a square with the cropper, or let the generator pad it, rather than stretching it; and start from an SVG or a bitmap of at least 512×512, since a 512 pixel icon made from a 100 pixel PNG looks soft everywhere. The SVG to PNG tool rasterises a vector logo at any size.
The minimal recommended set
| Purpose | File | Size |
|---|---|---|
| Legacy and automatic requests | favicon.ico |
16, 32, 48 px inside |
| Modern browsers | icon.svg |
Vector |
| Fallback tab icon | favicon-32x32.png |
32×32 |
| iOS home screen | apple-touch-icon.png |
180×180, opaque, square corners |
| Android and install prompts | icon-192.png, icon-512.png |
192×192, 512×512 |
| Android adaptive shapes | icon-maskable-192.png, icon-maskable-512.png |
Opaque, content within the central 80 % circle |
| Metadata | site.webmanifest, theme-color meta |
– |
Generating the set
- Start from a square source: an SVG, or a PNG of at least 512×512 without a baked-in background unless you want one everywhere.
- Decide the background colour for the opaque icons and check the mark is legible at 16 pixels; simplify it if not.
- Generate the files. The favicon generator produces the
.ico, the PNG sizes, the Apple touch icon, a manifest and the HTML snippet from one image, entirely in your browser. - Copy
favicon.icoandapple-touch-icon.pngto the site root, place the rest where the snippet points, and paste the snippet into<head>. - Load the site on a phone and add it to the home screen on both iOS and Android, then look at a tab in light and dark mode. Five minutes of checking catches the black-square and blurry-icon problems before visitors do.
Sources and further reading
- WHATWG HTML Living Standard – Link type "icon"
- MDN – <link>: The External Resource Link element
- MDN – theme-color meta name
- W3C – Web Application Manifest
- web.dev – Add a web app manifest
- web.dev – Adaptive icons support in PWAs with maskable icons
- Apple Developer – Configuring Web Applications (Safari Web Content Guide)
- Google Search Central – Define a favicon to show in search results
About the author
HelpMeJPG editorial teamEditorial team
The people who build and maintain the HelpMeJPG tools. Guides are written from the tools' own behaviour and the standards they implement, and are revised whenever a tool changes.