A favicon is not one file. It is a small set of images, referenced from different places, each of which has habits about format and size. Shipping only a .ico, or only an SVG, is how you get a sharp tab icon in one browser and a missing or blurry mark in another.
This is a comparison of where SVG, PNG and ICO belong, and of why a complete package usually includes all three — plus a few PNG-based extras for Apple devices and installed web apps.
The short version
-
ICO still belongs at the site root, typically as
/favicon.ico, because a lot of clients look there by default. -
PNG is the workhorse for explicit
<link>icons, Apple touch icons, and icons listed in a web app manifest. You choose a size for each job. - SVG is the scalable option for modern browser tabs: one vector file that stays sharp at any zoom or density, when the client supports it.
You do not usually pick a single winner. You assign each format to the places that understand it, and you let older or stricter clients fall back to ICO or PNG.
ICO: the default file clients still request
ICO is the original favicon format. A single .ico file can contain several raster sizes, so a 16-pixel tab and a 32-pixel bookmark can come from one object. Many browsers, some bookmarks, intranet tools and older software will still request /favicon.ico even if your HTML never mentions it.
Put an ICO there. If you leave the root file out and only ship modern link tags, some environments will never see your mark, or will show an empty one they invented from a previous visit.
ICO is not the best format for a large, sharp icon on a phone home screen. It is the compatibility file: small, expected, and boring in a useful way. Treat it as the fallback, not as the only asset you design.
PNG: sized rasters for almost every other slot
PNG is the format you use when a client wants a specific pixel size, or when you need a clean raster with transparency.
Typical PNG jobs:
-
Tab and bookmark icons declared in HTML, for example 16×16 and 32×32 (and sometimes 48×48) via
<link rel="icon">. These catch browsers that prefer an explicit PNG over the root ICO. -
Apple touch icons, usually a larger PNG (commonly 180×180) via
apple-touch-icon. iOS home-screen and some Safari UI use this path, not your SVG. - Manifest icons for a PWA or "Add to Home Screen" flow, often including 192×192 and 512×512 PNGs, and a maskable variant when you ship a manifest. Those are still raster files, even if your tab icon is a vector.
PNG is a poor substitute for a missing ICO at the root, and a bulky substitute for SVG in browsers that can render a vector in the tab. It is the right choice wherever a platform's documentation asks for a PNG of a given size.
When you generate a set, export the PNGs from the same artwork as the ICO and SVG so the mark matches, then keep each size as its own file rather than stretching a 16-pixel PNG up to 512.
SVG: one sharp file for clients that can use it
SVG is a vector format, so it does not have a native "size" in the way a PNG does. In supporting browsers you can point rel="icon" at an SVG and get a crisp glyph at every scale: retina tabs, zoomed UI, unusual densities.
SVG is at its best when the mark is simple — a letter, a monogram, a logo that already works as a vector. It is less helpful as the only favicon you ship:
- Support is broad in current desktop browsers, but it is not universal across every device, WebView and older client.
- Apple touch icons and most PWA manifest icons still want PNG.
- Very complex artwork, or a mark that relies on tiny raster effects, may be clearer as a carefully drawn PNG at the sizes you actually use.
Use SVG as the modern tab icon when you have a clean vector, and keep ICO and PNG next to it as fallbacks. Do not assume that uploading an SVG alone will cover phones, search, and installed apps.
How the pieces sit together
A practical set looks like this:
-
/favicon.ico— ICO fallback at the root. - An SVG icon in HTML, if you have a vector mark and want it in supporting tabs.
- Small PNG icons in HTML, so clients that want a raster
rel="icon"do not have to invent one. - An Apple touch PNG for iOS and related surfaces.
- Manifest PNGs (and a maskable icon, if you ship a PWA) plus the manifest file that points at them.
- An HTML snippet that references those files in the right slots, so you are not wiring formats by memory.
The formats follow the slots. ICO is for the default request; SVG is for scalable tabs; PNG is for almost every named size, including Apple and manifest icons.
favicon.now builds ICO, PNG, SVG, Apple and maskable PWA icons plus a web app manifest and HTML snippet from an image, SVG, text or emoji. Use the package as a set: put each format where that client will actually look, rather than betting the whole site on a single extension.
Top comments (1)
「格式跟着槽位走」这个总结很到位,我之前只放一个 SVG,结果在 iOS 加到主屏幕时直接没图标,才意识到 Apple touch icon 根本不走 SVG 这条路。另外提醒根目录留 /favicon.ico 也很实用,有些老客户端和爬虫根本不看 link 标签,只会默认去根目录请求。