Skip to content
Go back
en

[Latest] How to Optimize Your Favicon [Best Practice Generator]

Published:Updated:

After updating a website favicon and then seeing it never show up in Google Search results, I made and released a tool that generates a set of favicons designed to be easier for Google to pick up. I mostly built it for myself, but it is general-purpose enough, so please feel free to use it.

Favicon Best Practice Generator

Favicon Best Practice Generator

Load an image and generate a complete best-practice favicon set plus<head> tags all at once (the image is never sent outside your browser).

1. Import an image

No file selected

Supported: PNG/JPG/SVG/WebP/AVIF/GIF (any format your browser can load)

Recommended: SVG (enables favicon.svg / mask-icon)

2. Finishing settings

Example: / / /assets/favicons/ (root-relative recommended)

Mobile UI color. If blank, no tag will be output.

Single-color fill for Safari pinned tabs.

Adjustable from 0 to 24%.

Preview

3. Files to generate

Manifest metadata

Name shown on the home screen and during installation.

Short display name for the home-screen label.

Start URL when the PWA launches.

Advanced filename settings

After deployment, it is safer not to change filenames or paths frequently.

Recommended file list

    Place the generated files under public/.

    Generation preview

    Small sizes are shown at actual size; larger sizes are scaled down for comparison.

    4. head tags / manifest

    Paste this snippet into <head>.

    Assumes it will be placed under public/ as site.webmanifest (the filename can be changed above).

    5. Generate and download

      Updates

      2025-12-15 (reviewed the SEO/crawling rules)

      Following Google Search Central’s favicon guide, I reflected requirements that often become SEO/compatibility pitfalls in the generator defaults and output guide. Google Search Central: Define a favicon to show in search results Google Search Central: Latest documentation updates

      • Added output and warnings based on the assumption that you do not change the URL frequently.
      • Clarified in the UI and explanation that there is one favicon per hostname (you cannot separate them by subdirectory).
      • Added output-guide checklist items based on the assumption that Googlebot / Googlebot-Image can crawl the files (robots, authentication, 404s, etc.).
      • As a rule, icon is recommended for rel, while shortcut icon is treated as not recommended from a standards-compliance perspective.

      Based on MDN’s explanation of the rel attribute, I reflected the gap between standards compliance and real-world operation in the generator defaults. MDN: HTML attribute rel

      • Removed rel="shortcut icon" from the default output (not recommended from a standards-compliance perspective).
      • When outputting multiple <link rel="icon"> tags, reorganized the template around selection using type / sizes / media, including the output order and how attributes should be assigned (for example, SVG + PNG fallback).
      • For iOS, clarified the policy of generating a separate apple-touch-icon, assuming it does not refer to rel="icon" or sizes.

      2024-10-26 (updated for Google Search favicon requirements)

      I reflected Google Search Central’s SEO requirements in the generator defaults. Google Search Central: Latest documentation updates Google Search Central: Define a favicon to show in search results

      • Strengthened the input-image cropping/padding guidance based on a 1:1 (square) assumption.
      • Changed the output to satisfy the minimum 8×8 requirement while recommending sizes larger than 48×48 (a design that provides at least one PNG larger than 48px).
      • Added keep the favicon URL stable (do not change it frequently) as a strong warning.
      • Reflected the one favicon per hostname limitation in the UI/output guide.

      2024-04-16 (added maskable icons as a “practical standard for PWA compatibility” option)

      To match Lighthouse audit requirements, I made it possible to enable maskable icon generation only when you are considering PWA support. Chrome for Developers: “Manifest doesn’t have a maskable icon”

      • Optionally generate a Web App Manifest and output entries in icons that include purpose: "maskable" (or any maskable) (default: site.webmanifest; change it if needed).
      • However, for cases like blogs that are not aiming to be PWAs, the design does not force a manifest to be emitted (to avoid increasing unnecessary files and expectations).

      2024-04-12 (added favicon.svg generation and PNG/ICO fallbacks)

      While incorporating the advantages of SVG favicons (scaling, theme adaptation, etc.), I templated a policy of keeping ICO/PNG files for unsupported environments. web.dev: Building an adaptive favicon

      • Generate an SVG favicon and output <link rel="icon" ... type="image/svg+xml"> (default: favicon.svg; change it if needed).
      • Also adopted a recommended template that references .ico first as a fallback (progressive enhancement).

      2023-6-21

      Created the Favicon Best Practice Generator


      • How to Build a GAS Tool That Automatically Likes Tweets on Your Twitter Timeline
      • How My Solo-Developed Twitch Follower Analysis Web App Surpassed 100,000 Cumulative Active Users
      • [Minecraft Mod Development] Cache Expensive Calculation Results
      • [PUBG] How to Create an API Key
      • [Twitch Follower Checker] How to Check New Followers and Unfollowers on a Twitch Channel

      Previous Post
      Settings you should absolutely check after buying a PC, focused on gamers and engineers
      Next Post
      If You're Installing Node.js or pnpm on Windows Now, Use mise! A Quick Cheat Sheet (VSCode + Git Bash)