Skip to content
Future Forge ToolsWeb Tools ProOpen free tools

Image Tips

Favicon Format: ICO vs PNG vs SVG and Which One to Use

The best favicon format explained: ICO vs PNG vs SVG, the dark mode SVG trick, and the minimal set of files and link tags a modern website actually needs.

Favicon Format: ICO vs PNG vs SVG and Which One to Use
On this page

The best favicon format for most sites is a combination: an SVG icon for modern browsers, a favicon.ico fallback at the site root, and a 180×180 PNG apple-touch-icon. ICO works almost everywhere, PNG is what Apple and Android expect, and SVG stays sharp at any size and can even adapt to dark mode.

No single format wins on its own, which is why favicon advice gets confusing. The good news is that the modern set is small: four or five files and four lines of HTML.

This guide is about formats and which files to ship. If you want the full breakdown of pixel dimensions for each device, see favicon sizes explained.

Try it: Favicon GeneratorCreate a complete favicon package from a logo, letter or emoji: favicon.ico, PNG sizes, Apple touch icon, Android icons, web manifest and HTML tags.

Open tool — free

What is the best format for a favicon?

Each format has one job it does better than the others:

ICOPNGSVG
Browser supportEssentially universalAll modern browsersMost modern browsers; Safari has lagged
Several sizes in one fileYesNo, one size per fileNot needed, it scales
TransparencyYesYesYes
Dark mode versionNoNoYes, with a media query
Typical file sizeSmall to mediumSmallOften tiny for simple shapes
Best useRoot fallback, legacy toolsApple touch icon, manifest iconsPrimary tab icon

For most people, the answer is “SVG for the tab, ICO as the safety net, PNG for phones.” If your logo is a detailed photo or illustration that doesn’t work as vector art, skip the SVG and rely on ICO and PNG.

The favicon.ico format explained

An ICO file is a container. Inside it sit one or more images, stored as BMP or PNG data, each at a different size. The browser picks the size that fits: 16×16 for a standard tab, 32×32 for high-density screens, and 48×48 in some desktop shortcuts.

Keep one at /favicon.ico even if you use SVG. Some browsers, feed readers and other tools request that exact path without looking at your HTML, and a missing file just fills your logs with 404 errors.

A common shortcut is renaming logo.png to favicon.ico. That isn’t a conversion. Some browsers sniff the file and show it anyway, but tools that expect a real ICO can fail, so generate a proper one.

SVG favicons and the dark mode trick

An SVG favicon is a vector file, so one file looks crisp in a 16-pixel tab and on a 4K screen. Because SVG can contain CSS, it can also respond to the user’s color scheme. A dark logo that disappears on a dark browser tab can switch to a light color automatically:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
  <style>
    path { fill: #1a1a1a; }
    @media (prefers-color-scheme: dark) {
      path { fill: #ffffff; }
    }
  </style>
  <path d="M6 4h14l6 6v18H6z"/>
</svg>

The media query follows the operating system or browser theme, so test it both ways. Keep the artwork simple: a letter or a bold symbol. Fine details vanish at tab size whatever the format.

Favicon size and format: the minimal modern set

You don’t need dozens of files. This set covers modern browsers, iOS, Android and installable web apps:

  • favicon.ico with 16×16 and 32×32 images (48×48 optional)
  • icon.svg for modern browsers
  • apple-touch-icon.png at 180×180
  • icon-192.png and icon-512.png for the web manifest
  • site.webmanifest

And the tags for your page head:

<link rel="icon" href="/favicon.ico" sizes="32x32">
<link rel="icon" href="/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="manifest" href="/site.webmanifest">

The sizes="32x32" on the ICO line is deliberate. Without it, some browsers pick the ICO over the SVG.

apple-touch-icon

iOS uses this PNG when someone adds your site to the home screen. It must be PNG, not SVG or ICO. Give it a solid background rather than transparency, since iOS may fill transparent areas with black, and leave some padding because the corners get rounded.

Manifest icons

Android and installed web apps read icons from the manifest:

{
  "name": "Example Site",
  "icons": [
    { "src": "/icon-192.png", "type": "image/png", "sizes": "192x192" },
    { "src": "/icon-512.png", "type": "image/png", "sizes": "512x512" },
    { "src": "/icon-maskable.png", "type": "image/png", "sizes": "512x512", "purpose": "maskable" }
  ]
}

A maskable icon has extra padding so Android can crop it into a circle or rounded square without cutting off your logo.

How to create the full set

Our free favicon generator creates the ICO, PNG sizes, Apple touch icon, Android icons, manifest and HTML tags from one image, letter or emoji, all in your browser.

  1. Start with a square source image of at least 512×512 pixels, or pick a letter or emoji.
  2. Choose a background color with strong contrast, and keep padding small so the icon fills the tab.
  3. Check the small previews. If you can’t recognize it at 16 pixels, simplify the design.
  4. Download the package and upload the files to your site root.
  5. Paste the link tags into your page head, replacing any old favicon tags.
  6. If you have a vector logo, export it as icon.svg, add the dark mode style if you need it, and include the SVG tag shown above.

Need only a single multi-size ICO from an existing PNG? The image converter can do that directly. On WordPress, the built-in Site Icon setting generates the PNG sizes for you.

Which format to use

Ship an SVG as your main icon, keep a real favicon.ico at the root for everything else, and add a 180-pixel PNG apple-touch-icon plus 192 and 512 pixel manifest icons. If your logo can’t be vector, ICO plus PNG is perfectly fine. Then test in a private window, because browsers cache favicons stubbornly.

Frequently asked questions

What is the best format for a favicon?

Use more than one. An SVG favicon for modern browsers, a favicon.ico fallback at the site root, and a 180x180 PNG Apple touch icon cover practically every browser and device.

Can I just rename a PNG to favicon.ico?

It is not a real conversion. Some browsers detect the PNG inside and show it anyway, but other software expects a true ICO file, so convert it properly with a favicon or image converter.

What size and format should a favicon be?

For favicon.ico, include 16x16 and 32x32 pixel images, optionally 48x48. Use a 180x180 PNG for the Apple touch icon and 192x192 and 512x512 PNGs for the web manifest, while an SVG icon scales to any size.

Does Google support SVG favicons in search results?

Google Search says it supports any valid favicon format. Keep a favicon.ico or PNG version as well so every crawler and browser has something it can read.

Free tools for this

admin

Writes practical guides for Future Forge Tools, where every tool runs privately in your browser.