Free online tool

Upload a file

Drop your file hereTap to choose a file

or click to browse, or paste from the clipboard

← Back to Blog

Favicon Sizes and HTML Code: How to Add a Favicon to Your Website

Favicons appear at 16 × 16 pixels in browser tabs and bookmarks, so the classic favicon size is 16 × 16, plus a 32 × 32 version that stays sharp on high-density screens. A complete set in 2026 adds a favicon.ico holding 16, 32 and 48 px images, a 180 × 180 Apple touch icon for iPhone and iPad Home Screens, and 192 × 192 and 512 × 512 manifest icons for Android and installed web apps, all square and linked from your page's <head>.

Favicon Package Generator makes the whole set from one image, with a starter web manifest and the HTML to paste.

Favicon size chart: which file each device uses

File Size What uses it
favicon.ico 16, 32 and 48 px in one file Tabs, bookmarks and automatic /favicon.ico requests
favicon-32x32.png 32 × 32 Tabs on high-density screens
favicon-16x16.png 16 × 16 Tabs on standard screens
apple-touch-icon.png 180 × 180 iPhone and iPad Home Screen
android-chrome-192x192.png 192 × 192 Web app manifest: Android and installed apps
android-chrome-512x512.png 512 × 512 Web app manifest: Android and installed apps

Every file is square, and the HTML and manifest refer to them by name, so keep those names.

Older checklists add more sizes, such as Apple icons at 120, 152 and 167 pixels and extra Android sizes. You can skip them. Apple's Safari documentation says that when no icon matches a device, the smallest larger one is used, so one 180 px file serves iPhones and iPads. For manifests, Google says Chromium needs a 192 px and a 512 px icon and scales those two to fit the device.

Apple touch icon size

The Apple touch icon is a 180 × 180 PNG named apple-touch-icon.png, shown when someone adds your site to an iPhone or iPad Home Screen. Safari also looks for that file in your site root when a page has no tag, but MDN recommends explicit link tags rather than relying on that convention.

Give it a solid background, because iOS fills transparent areas on the Home Screen with a color you don't choose.

Favicon size for Google Search

Google can show your favicon beside your search results if it follows Google's favicon guidelines:

  • Square, at least 8 × 8 pixels; larger than 48 × 48 is recommended.
  • BMP, GIF, ICO, PNG, JPEG, PPM or TIFF. SVG is not on the list.
  • Declared with a tag such as rel="icon" or rel="apple-touch-icon" in your home page's <head>.
  • Not blocked by robots.txt, for both the home page and the icon file.
  • One favicon per hostname, at a stable URL.

How to make a favicon package with Zutilium

  1. Open Favicon Package Generator and click Choose file, or drop your logo on the page. It takes one still JPG, PNG, WebP, AVIF or TIFF image up to 10 MiB and 25 million pixels. Use a square image at least 512 pixels wide; smaller ones are enlarged and look soft.
  2. Under Settings, replace the defaults in Website name (up to 80 characters) and Short name (up to 40). Both go into the manifest; the short name labels your icon where space is tight, such as a home screen.
  3. Enter a Theme color as a six-digit hex code, such as #2255cc. Three-digit codes like #fff are rejected.
  4. Under Image fitting, choose Fit with transparent padding to keep the whole image, or Fill and crop to cut a centered square from it.
  5. Click Convert to ZIP. The image is uploaded to Zutilium's server and processed there. When "Your ZIP is ready" appears, click Download; the ZIP is temporary, so save it promptly.
  6. Extract the ZIP, read README.txt, and copy the tags from install.html.

Inside are ten files: favicon.ico (holding 16, 32, 48 and 256 px images), PNG favicons at 16, 32 and 48 px, the 180 px Apple touch icon, the 192 and 512 px Android icons, site.webmanifest, install.html and README.txt. Every icon is resized from one 512 × 512 master, after photos are turned upright using their orientation tag.

Before publishing, view favicon-16x16.png at 100% zoom; if your mark is unrecognizable, simplify the source. For ICO internals, see how to create an ICO file from a PNG; ICO Generator makes a single ICO from a choice of size presets.

How to add a favicon to a website: the HTML code

This is the favicon HTML code from install.html, in a package made with the theme color #2255cc:

<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="manifest" href="/site.webmanifest">
<meta name="theme-color" content="#2255cc">
  1. Upload the icons and site.webmanifest to your site root, the folder that serves https://example.com/. Frameworks usually copy a folder named public or static there.
  2. Paste the six lines inside the <head> of every page, usually through one shared header or layout template.
  3. Open https://example.com/favicon.ico. You should see the icon, not an error page or your home page.

Paths that start with / work on every page. If your site lives in a subfolder such as /app/, add it to each path in the HTML and the manifest, and to start_url. The theme-color line suggests a color that some browsers use to tint their interface.

The snippet doesn't reference favicon-48x48.png; favicon.ico already holds that size, so you can leave the PNG out. You don't need rel="shortcut icon" either; Google treats it as an older form of icon.

WordPress and site builders

WordPress writes its own icon tags. In WordPress 6.5 or later, go to Settings > General, click Choose a Site icon and pick a square image of at least 512 × 512 pixels (WordPress recommends PNG), such as the package's android-chrome-512x512.png. WordPress then outputs 32, 180 and 192 px icon tags, so don't paste install.html too. Hosted site builders have a similar favicon setting.

The web manifest and its 192 and 512 px icons

site.webmanifest gives Android and desktop browsers your app name, colors and large icons. Here is the generated file, with the icon entries condensed:

{
  "name": "Example Studio",
  "short_name": "Example",
  "icons": [
    { "src": "/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png", "purpose": "any" },
    { "src": "/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png", "purpose": "any" }
  ],
  "theme_color": "#2255cc",
  "background_color": "#2255cc",
  "display": "standalone",
  "start_url": "/"
}
  • Theme color fills both theme_color and background_color. Google says the background color is used on the splash screen when the app launches on mobile, so edit it if you want a different one.
  • "display": "standalone" opens an installed icon in an app-style window without the browser's navigation controls. Use "browser" for a normal tab.
  • If a framework or plugin already made a manifest, copy the icons entries into it instead.
  • The package adds no service worker or offline support and doesn't guarantee your site becomes installable.

Both icons use "purpose": "any". Google's maskable icon guide explains that Android shows such icons on a white background, and transparent ones inside a white circle. For an edge-to-edge icon, make a version with the logo inside a central circle 80% as wide as the icon, and add it as a separate entry with "purpose": "maskable".

Worked example: how a logo shrinks to 16 pixels

Every icon comes from the same 512 px square, so your source's shape decides how much of each icon the logo fills. With Fit with transparent padding, a wide logo's height in an icon is the icon size × the logo's height ÷ its width:

Icon Square logo 3:2 logo (1200 × 800) 4:1 wordmark (2000 × 500)
16 px favicon 16 × 16 16 × 11 16 × 4
32 px favicon 32 × 32 32 × 21 32 × 8
180 px Apple icon 180 × 180 180 × 120 180 × 45
512 px manifest icon 512 × 512 512 × 341 512 × 128

Running the tool on solid test images of these shapes gave the same sizes within one pixel, since edge pixels are blended. A wordmark 4 pixels tall is a smudge in a browser tab.

Fill and crop always fills the square but trims both sides evenly: the 3:2 logo loses 200 of its 1,200 pixels on each side, and the 4:1 wordmark keeps only its middle 500 of 2,000 pixels.

  • Square logo or symbol: both settings give the same result.
  • Wide logo, important part centered: choose Fill and crop.
  • Wide wordmark: use the symbol, monogram or first letter instead. In Image Editor, turn on Enable Crop, click 1:1, drag the box over that part and click Done (more in how to crop an image). Leave a small margin, since iOS rounds the corners of Home Screen icons.

How to test your favicon

Check How
Files load Open /favicon.ico, /apple-touch-icon.png and /site.webmanifest on your domain
Tags in place View the source of a few pages; the lines must be inside <head>
Manifest Chrome DevTools, Application > Manifest: fields, icons and errors
Tab icon A private window, in light and dark browser themes
iPhone Safari: Share (from the Page Menu button or the Share button), then Add to Home Screen
Google URL Inspection in Search Console on your home page, then request indexing

Troubleshooting favicon problems

The old favicon still shows

Browsers keep favicons in their own cache, and bookmarks keep the icon they saved, so a reload may not replace it. Check in a private window first.

To make returning visitors' browsers fetch the new icon, add a version to each href, such as /favicon-32x32.png?v=2, or rename the files and update the tags and manifest. Do it only when the icon changes, not on every deploy, because Google asks for a stable favicon URL.

The favicon shows on some pages but not others

The tags are probably in one page rather than the shared header, or the paths are relative. href="favicon.ico" resolves from the current folder, so on /blog/post/ it points to /blog/post/favicon.ico. Start every path with /.

Google shows a default icon instead of yours

Google only reads the favicon declared on your home page, and a section such as example.com/shop/ shares the site's icon. Recheck the Google rules above, then request indexing and wait.

Phone icons have a dark, white or odd background

iOS fills transparent areas of apple-touch-icon.png, and Fit with transparent padding adds transparent bands to non-square images. Make a square, opaque copy in Image Editor: click the 512×512 preset, set Resize Mode to Contain (with padding) and Background to White or Black, and choose JPG as the Output Format. Run the package on that copy and use only its apple-touch-icon.png.

In browser tabs, check a dark theme too, where a black logo on a transparent background can vanish. On Android, a white circle means the icon isn't maskable.

DevTools reports a manifest problem

Open the manifest URL directly: a 404 means a wrong path, and a login page means the site is protected. On a staging site behind HTTP Basic Authentication, such as one using a .htpasswd file, add crossorigin="use-credentials" to the manifest link, as MDN's manifest guide explains. Servers should send the file as application/manifest+json.

The tool rejects your image

  • SVG logo: convert it to PNG with Image Converter, which keeps the SVG's own dimensions and never enlarges; check that the PNG is at least 512 pixels wide. If it is smaller, open the SVG in a text editor, set the width and height attributes of the svg tag to 1024 (keep the viewBox), and convert again, or export a 1024 px PNG from your design app.
  • Too large: files over 10 MiB or 25 million pixels are refused. Resize first; 1024 × 1024 is plenty.
  • Animated or multi-page: export one still frame or page.

Frequently asked questions

What size should a favicon be?

Start from a square image of at least 512 × 512 pixels and export the standard sizes from it. Browsers usually show favicons at 16 × 16 and use 32 × 32 on high-density screens, while phones and installed apps use the 180, 192 and 512 px versions.

Do I still need a favicon.ico file?

Yes. Browsers request /favicon.ico from your site root on their own when a page has no icon tags, and one ICO file can hold several sizes. Keep it there even if your pages link to PNG icons.

Can I use a PNG or SVG favicon instead of ICO?

PNG favicons work in current browsers, and the package links its 16 and 32 px PNGs. Browsers that support SVG icons can use one through type="image/svg+xml", but Google Search doesn't list SVG as a supported favicon format, so keep the ICO and PNG files as well. If you add an SVG icon, change the ICO line to list the sizes it really holds, sizes="16x16 32x32 48x48 256x256".

How long does a new favicon take to show in Google?

Google says crawling can take several days to several weeks. Request indexing of your home page with the URL Inspection tool in Search Console, and keep the icon's URL stable afterwards.