Skip to content
ImgPress.online
Tutorials

How to Make a Favicon: Sizes, Formats and HTML Code

A favicon is tiny but shows up everywhere, from browser tabs to search results. Here are the sizes you need, which formats to use and the exact HTML to add.

ImgPress EditorialPublished Updated 6 min read
Share:
Illustration for How to Make a Favicon: Sizes, Formats and HTML Code
On this page

It's 16 pixels wide, sits in a browser tab next to fifteen others, and most visitors will never consciously notice it. Yet a missing favicon makes a site look unfinished, and a good one is how people find your tab among a crowded row. It also appears next to your site name in Google's mobile results and on phone home screens.

Making one isn't hard, but the number of sizes and formats floating around online makes it seem complicated. Here's what you actually need in 2026, why, and the HTML to put it all in place.

What is a favicon and where does it appear?

A favicon (short for "favorite icon") is the small image that represents your website. You'll see it in:

  • Browser tabs and bookmarks
  • Browser history and the address bar on some browsers
  • Google Search results, next to your site name, particularly on mobile
  • Phone home screens when someone saves your site as a shortcut
  • Progressive web app (PWA) launchers and splash screens

Each of those places displays it at a different size, which is where the size list comes from.

What favicon sizes do you need?

You don't need the twenty-file packs some generators produce. This set covers modern browsers, Apple devices, Android and search engines:

Size Format Used for
16 × 16 ICO or PNG Browser tabs on standard displays
32 × 32 ICO or PNG Tabs on high-density screens, taskbar shortcuts
48 × 48 ICO or PNG Windows site shortcuts; a sensible minimum for Google Search
180 × 180 PNG Apple touch icon (iPhone and iPad home screens)
192 × 192 PNG Android home screen, referenced in the web app manifest
512 × 512 PNG PWA splash screens and install prompts, in the manifest
Any (scalable) SVG Modern browsers that support SVG favicons

The 16, 32 and 48 versions can live together inside a single favicon.ico file, which is one of the format's main advantages.

Should you use ICO, PNG or SVG?

Each format has a role, and most sites use a combination.

ICO is the original favicon format. Its trick is holding several sizes in one file, so the browser picks the best one. Every browser understands it, and some tools still request /favicon.ico from your site root automatically, even if you never link it.

PNG is simpler to make and edit, supports transparency, and is what Apple and Android expect for home screen icons. Modern browsers are happy with PNG favicons in tabs too.

SVG is a vector format, so one file stays sharp at any size. It's also the only format where you can add a CSS media query inside the file to switch colors for dark mode. Most current browsers support SVG favicons; Safari's support has historically lagged, which is why you keep a PNG or ICO as a fallback.

A practical combination: favicon.ico (16/32/48) for compatibility, an SVG for modern browsers, a 180-pixel PNG for Apple and 192/512 PNGs in the manifest.

How do you create a favicon?

Start with a square source image at least 512 × 512 pixels, ideally your logo mark rather than the full logo with text. If your logo is an SVG, convert it to a large PNG first with SVG to PNG. If it isn't square, crop it with Crop Image so the icon sits centred with a little breathing room.

Then use the Favicon Generator on ImgPress:

  1. Open Favicon Generator and drop in your square image.
  2. Check the previews at small sizes, especially 16 and 32 pixels.
  3. Adjust background or padding if the icon looks cramped.
  4. Download the package: ICO, PNGs and the code snippet.
  5. Upload the files to your site's root folder and add the HTML below.

Everything runs in your browser; your logo isn't uploaded anywhere.

What HTML do you add for a favicon?

Place these tags in the <head> of every page, or at minimum your home page (which matters for Google). Adjust the paths if your files aren't in the root.

<!-- Classic ICO for older browsers and tools -->
<link rel="icon" href="/favicon.ico" sizes="48x48">

<!-- Scalable SVG for modern browsers -->
<link rel="icon" href="/favicon.svg" type="image/svg+xml">

<!-- Apple touch icon for iPhone and iPad home screens -->
<link rel="apple-touch-icon" href="/apple-touch-icon.png">

<!-- Web app manifest with 192 and 512 icons -->
<link rel="manifest" href="/site.webmanifest">

And the icon section of site.webmanifest:

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

Tip: Name the Apple icon apple-touch-icon.png and keep it in the root. iOS looks for that file name by default even if the link tag is missing.

What are Google's favicon requirements?

Google shows favicons beside results, and it has specific rules. Based on Google Search Central's guidance:

  • Square shape. The icon must have a 1:1 aspect ratio.
  • Size. Google's minimum is small, but it recommends going larger than 48 × 48 pixels. Using a multiple of 48 (48, 96, 144, 192) is a safe habit that also matches its earlier guidance.
  • Linked from the home page. Add the rel="icon" link tag to your home page's <head>. Google uses one favicon per hostname.
  • Crawlable. Both the home page and the favicon file must be accessible to Google's crawlers. Don't block the icon's path in robots.txt.
  • Stable URL. Avoid changing the favicon's URL frequently.
  • Appropriate content. Google won't show icons it considers inappropriate, and may substitute a generic icon.

If your favicon isn't showing in search results after a few weeks, check these first. Our guide on optimizing images for SEO covers crawlability for images more broadly.

How do you design an icon that works at 16 pixels?

This is where most favicons fail. A logo that looks great on a business card turns into a smudge at 16 × 16, which is only 256 pixels in total.

  • Use a symbol, not your full logo. Drop the wordmark and tagline. A single letter or a simple mark works best.
  • Go bold. Thin strokes disappear. Fill shapes and use heavy weights.
  • Limit colors. Two or three high-contrast colors read better than a gradient.
  • Fill the space. Too much padding makes the icon look tiny next to others in the tab bar. Leave just a pixel or two.
  • Test on light and dark. Browser tabs come in both. A dark logo on a transparent background can vanish in dark mode; a solid background shape or an SVG with a dark-mode style fixes that.
  • Preview at real size. Look at it in an actual browser tab, not just zoomed in on your design canvas.

Note: For the 16 and 32 pixel versions, a slightly simplified design (thicker lines, fewer details) often looks better than an automatic shrink of the large icon. Designers sometimes adjust these by hand for exactly this reason.

Common favicon mistakes

  • Uploading a non-square image. Browsers squash it, and Google may ignore it.
  • Only providing a 16-pixel icon. It looks blurry on high-density screens and in search results.
  • Transparent Apple touch icon. iOS fills transparent areas with black. Use a solid background for the 180-pixel PNG.
  • Blocking the icon in robots.txt. Common on sites that block entire asset folders.
  • Forgetting cache. You've updated the file but still see the old one. Clear the cache or test in a private window before assuming it's broken.

Spend ten minutes on it once and your favicon will quietly do its job across every tab, phone and search result for years.

Written by ImgPress Editorial

Our editorial team writes and maintains practical guides on working with images. Articles are reviewed for accuracy and updated when tools or best practices change. Spotted an error? Let us know.

Questions readers ask

Why isn't my new favicon showing up?

Browsers cache favicons aggressively, so an old one can stick around for a while. Try a hard refresh, open the site in a private window, or visit the favicon URL directly. If you replaced the file at the same URL, adding a version query such as ?v=2 to the link tag can help.

How long does it take for a favicon to appear in Google Search?

It depends on when Google next crawls your home page and favicon. It can take anywhere from a few days to several weeks. Making sure the file is crawlable and the link tag is on the home page is the main thing you can control.

Do I still need a favicon.ico file?

It is no longer strictly required, as modern browsers read PNG and SVG icons from link tags. Many sites keep a favicon.ico in the root anyway, because some older tools and browsers request that file automatically.