Favicon Generator
Generate professional website favicons and complete PWA asset packages locally in your browser. Creates ICO, multi-size PNGs, Apple Touch icons, and Web Manifests.
Favicon & Website Icon Generator
Upload your PNG, JPG, WEBP, or SVG logo. We will scale, render, and package favicon packages entirely inside your web browser.
The Definitive Engineering Guide to Web Iconography: Favicons, Touch Assets, and Web Manifests
In the early days of the internet, website identity was represented solely by text URLs. In 1999, Microsoft introduced Internet Explorer 5, which checked a website's root directory for a file named favicon.ico. If present, the browser displayed a 16x16 pixel icon next to the address bar and in bookmark lists.
This simple feature marked the beginning of web iconography. Over the next two decades, web interfaces shifted from desktop monitors to high-DPI mobile screens, tablets, and Progressive Web Apps (PWAs). The single 16x16 icon has evolved into a system of icon specifications, touch assets, and manifest descriptors required to display correctly across all browsers, operating systems, and platforms.
This guide provides an engineering analysis of the favicon ecosystem, detailing ICO container structures, high-DPI scaling, PWA integration, safe area guidelines, and secure client-side asset compilation.
1. The ICO Container: Legacy Binary Architecture
While standard web displays use JPEG, PNG, or SVG formats, the core favicon standard relies on the ICO container format. Originally designed for Microsoft Windows application icons, the ICO format acts as a resource folder containing one or more sub-images of varying resolutions and color depths.
The Binary Structure of an ICO File
An ICO file is composed of three sections: the Header, the Directory Entries Table, and the Image Data segments.
┌────────────────────────────────────────────────────────┐
│ ICO HEADER │
│ Reserved (2B) │ Type (1=ICO) (2B) │ Count (2B) │
├────────────────────────────────────────────────────────┤
│ DIRECTORY ENTRIES TABLE │
│ ┌──────────────────────────────────────────────────┐ │
│ │ Directory Entry 1 (16B): W, H, Offset, DataSize │ │
│ ├──────────────────────────────────────────────────┤ │
│ │ Directory Entry 2 (16B): W, H, Offset, DataSize │ │
│ └──────────────────────────────────────────────────┘ │
├────────────────────────────────────────────────────────┤
│ IMAGE DATA │
│ ┌──────────────────────────────────────────────────┐ │
│ │ Image Data 1 (Raw PNG ArrayBuffer bytes) │ │
│ ├──────────────────────────────────────────────────┤ │
│ │ Image Data 2 (Raw PNG ArrayBuffer bytes) │ │
│ └──────────────────────────────────────────────────┘ │
└────────────────────────────────────────────────────────┘
1. Header (6 Bytes)
- Reserved (2 Bytes): Must always be 0.
- Type (2 Bytes): Specifies the resource type. Value is 1 for
.icofiles and 2 for.cur(cursor) files. - Image Count (2 Bytes): Specifies the number of distinct images contained within the file.
2. Directory Entry Table (16 Bytes per Entry)
For each image included in the container, a 16-byte directory descriptor defines its specifications:
- Width (1 Byte): Image width in pixels. A value of 0 indicates 256 pixels.
- Height (1 Byte): Image height in pixels. A value of 0 indicates 256 pixels.
- Color Palette (1 Byte): Number of colors in the color palette. Set to 0 if the image does not use a color palette (e.g. 24-bit/32-bit images).
- Reserved (1 Byte): Must be 0.
- Color Planes (2 Bytes): Typically set to 1.
- Bits Per Pixel (2 Bytes): The color depth of the image (typically 32 bits for RGBA PNGs).
- Data Size (4 Bytes): The exact size of the raw image data in bytes.
- Offset (4 Bytes): The byte offset from the beginning of the ICO file where the raw image data begins.
3. Image Data
Traditionally, raw image data was stored as uncompressed BMP (device-independent bitmap) streams. However, since Windows XP, Microsoft has allowed sub-images to be stored as raw PNG files compressed with DEFLATE. Our custom client-side binary compiler leverages this PNG compression. Instead of converting images to complex BMP streams, we compress each sub-image as a PNG and write the raw PNG bytes directly into the ICO container, keeping file sizes small and ensuring clean alpha-channel transparency.
2. Favicon Sizes and Target Specifications
To support all operating systems, devices, and browser interfaces, you need to generate a suite of icon files:
| File Name | Resolution (px) | Targeted Client / Device Context | | :--- | :--- | :--- | | favicon.ico | Multi-size (16, 32, 48) | Legacy browsers, Windows desktop shortcuts, root fallback requests. | | favicon-16x16.png | 16 × 16 | Standard browser tab favicon display. | | favicon-32x32.png | 32 × 32 | Bookmarks bar, high-DPI desktop viewports. | | favicon-48x48.png | 48 × 48 | Windows shortcut desktop grid display. | | favicon-96x96.png | 96 × 96 | Google Search result snippet listings. | | favicon-192x192.png | 192 × 192 | Android Chrome home screen shortcuts. | | favicon-512x512.png | 512 × 512 | PWA splash screens, developer source mockups. | | apple-touch-icon.png | 180 × 180 | Apple iOS home screens (Safari bookmarks). |
PWA Manifest Integration
Progressive Web Apps require a Web App Manifest (manifest.webmanifest) referencing the icons. This file is parsed by mobile operating systems during app installation:
{
"name": "My Progressive Web App",
"short_name": "My PWA",
"start_url": "/",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#518231",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
3. Client-Side Image Composition: Canvas Mechanics
Our Favicon Generator uses an offline, client-side canvas rendering pipeline to generate these assets. This approach relies on HTML5 Canvas manipulation:
1. Creating the Canvas
The generator initializes a 512x512 pixel canvas context to serve as the master resolution.
const canvas = document.createElement('canvas');
canvas.width = 512;
canvas.height = 512;
const ctx = canvas.getContext('2d');
2. Rendering Background Gradients
If the user selects a solid color or gradient background, the context is filled. For gradients, we calculate color stop vectors:
const gradient = ctx.createLinearGradient(0, 0, 512, 512);
gradient.addColorStop(0, '#518231');
gradient.addColorStop(1, '#436a28');
ctx.fillStyle = gradient;
ctx.fillRect(0, 0, 512, 512);
3. Corner Rounding (Border Radius)
To round the corners of the background, we define a path using a clipping mask: Let (R) represent the border radius value (0 to 256 pixels, where 256 yields a perfect circle). The path is defined as:
ctx.beginPath();
ctx.moveTo(R, 0);
ctx.arcTo(512, 0, 512, 512, R);
ctx.arcTo(512, 512, 0, 512, R);
ctx.arcTo(0, 512, 0, 0, R);
ctx.arcTo(0, 0, 512, 0, R);
ctx.closePath();
ctx.clip();
4. Dropshadow Composition
If dropshadows are enabled, we configure the drawing context parameters before drawing the logo:
ctx.shadowColor = 'rgba(0, 0, 0, 0.3)';
ctx.shadowBlur = shadowBlurSlider;
ctx.shadowOffsetX = shadowOffset;
ctx.shadowOffsetY = shadowOffset;
5. Drawing and Positioning the Logo
The logo image is drawn on top of the background. Let (W_{logo}) and (H_{logo}) represent the original image dimensions, (Z) represent the zoom scale factor, and (DX, DY) represent the horizontal and vertical offset translations. The logo is drawn at:
[X_{draw} = 256 - rac{W_{draw}}{2} + DX] [Y_{draw} = 256 - rac{H_{draw}}{2} + DY]
Where (W_{draw} = W_{logo} imes Z) and (H_{draw} = H_{logo} imes Z).
4. Logo Design Guidelines: Safe Areas & PWA Compliance
When designing website icons and PWAs, keep in mind how different operating systems display app icons.
Icon Masking on Mobile OS
Mobile operating systems mask home screen icons into different shapes: circles, squircles, or rounded rectangles.
- Android (Adaptive Icons): Android applies a circular mask to home screen icons. Any details placed in the corners of a square icon will be clipped.
- iOS (Squircle Icons): iOS crops icons into a squircle shape.
The PWA Safe Area
To prevent critical logo details from being clipped by OS masks, PWA standards define a Safe Area. The Safe Area is the inner 80% circle of the icon.
Let (C_{center} = (256, 256)) represent the center coordinate of a 512x512 icon, and (R_{safe} = 205) pixels represent the safe area radius (40% of the overall width).
All primary branding elements, texts, and logos should fall within this circle:
[(X - 256)^2 + (Y - 256)^2 le 205^2]
Our generator displays an overlay of this circular safe area boundary on the preview dashboard, helping you verify that your logo won't be cropped on mobile devices.
5. Deployment Guide: Link Tags & Framework Mappings
Once you have generated your favicon package, insert the correct metadata headers into your site to ensure browsers discover the assets.
Standard HTML Setup
Place the generated icon files in your website's root directory and insert these tags into your HTML page's <head>:
<!-- Generic Link Headers -->
<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="icon" href="/favicon-32x32.png" type="image/png" sizes="32x32">
<link rel="icon" href="/favicon-16x16.png" type="image/png" sizes="16x16">
<!-- Apple Touch Icon -->
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<!-- PWA Manifest Link -->
<link rel="manifest" href="/site.webmanifest">
<meta name="theme-color" content="#518231">
Next.js Metadata Setup
For modern Next.js configurations, you can export a metadata object from your root layout.tsx file:
import { Metadata } from 'next';
export const metadata: Metadata = {
title: 'My Web Application',
description: 'An enterprise web application.',
icons: {
icon: [
{ url: '/favicon.ico', sizes: 'any' },
{ url: '/favicon-16x16.png', type: 'image/png', sizes: '16x16' },
{ url: '/favicon-32x32.png', type: 'image/png', sizes: '32x32' },
],
apple: [
{ url: '/apple-touch-icon.png', sizes: '180x180', type: 'image/png' },
],
},
manifest: '/site.webmanifest',
};
Alternatively, Next.js supports file-based metadata. Simply place favicon.ico, icon.png (512x512), and apple-icon.png (180x180) in the root of your app/ directory, and the framework will automatically generate the appropriate tags at build time.
How to Use Favicon Generator
Upload your brand logo file (SVG, PNG, JPG, or WEBP) into the dashboard uploader.
Adjust styling properties: change background style (transparent, solid, or gradient), configure border radius, padding, and dropshadows.
Align your logo icon: use the scale slider or offset controls to center or shift elements inside the icon bounds.
Preview your icon across standard mockups (browser tabs, bookmarks, iOS and Android home screen panels).
Enter metadata properties for PWA support (app name, short name, theme color, background color, display mode).
Click 'Download Complete Package (ZIP)' to retrieve all generated icons and the manifest, or download files individually.
Frequently Asked Questions
What is a favicon?
Why does my website need a favicon?
What sizes are generated in a standard favicon package?
Can I convert an SVG file into a favicon?
Are my logo files uploaded to a server?
What is the difference between a favicon.ico and a PNG favicon?
How do I install the generated favicons on my website?
How do I configure favicons in Next.js projects?
What is an Apple Touch Icon?
What is a Web App Manifest?
What is the recommended size for a master favicon image?
Can I generate favicons with a transparent background?
Why should Apple Touch Icons not have transparent backgrounds?
What size is required for Android Chrome launch icons?
How do I use media queries for dark-mode favicons?
Is this Favicon Generator completely free?
Does the tool support offline operation?
What is the PWA logo safe area?
What does the padding slider do?
Can I rotate or move my logo inside the icon?
Why is the ICO file size larger than standard PNGs?
Do you support gradient backgrounds?
Can I upload JPEG files?
How do I check if my favicon is installed correctly?
Will my favicon show up on Google search results?
What is PWA theme_color and background_color?
How does the browser select which favicon size to display?
What is a multi-resolution ICO?
Can I generate favicons for subdomains?
Does the generator support border-radius rounding?
What is msapplication-TileImage?
Can I download files individually?
Why does my browser still show the old favicon after I updated it?
Is PNG to ICO conversion lossless?
Can I generate favicons for WordPress sites?
What is the recommended filename for the Web App Manifest?
Does this tool use third-party APIs?
What is a favicon Quality Score?
Can I upload HEIC files?
How does the preview mockup work?
Can I save my customized preset configurations?
What is the standard size of a Safari pinned tab icon?
Does the ZIP package include next.js configurations?
How do I configure the favicon for React Native?
What does msapplication-TileColor do?
Why do we include multiple sizes in favicon.ico?
Can I batch convert multiple logo assets at once?
What is the PWA display mode?
How do I configure a PWA splash screen?
Can I keep my favicons in a subdirectory instead of the root?
Key Features
- Generate multi-resolution favicon.ico files containing 16x16, 32x32, and 48x48 pixel densities
- Create a complete suite of standard PNG favicons ranging from 16x16 to 512x512 pixels
- Generate Apple touch icons (152x152, 180x180) optimized for iOS Home Screens
- Create Android Chrome-specific icons (192x192, 512x512) and auto-formatted Web Manifests
- Customize background colors, padding margins, border-radius rounding, and dropshadow depths
- Advanced vector/raster placement—zoom, scale, and adjust horizontal/vertical offsets
- Preview mockups in real-time across standard device contexts: browser tabs, bookmarks, and mobile home screens
- Export code snippets for HTML head links, Next.js metadata objects, and React configurations
- 100% browser-based processing—your logo files and design properties are processed locally and never uploaded
Common Use Cases
- Generating standard multi-size favicon.ico packages for launching new corporate websites
- Designing and packaging web app icons (Web Manifest icons) for Progressive Web Apps (PWAs)
- Creating customized, themed bookmarks and home screen shortcuts for SaaS applications
- Converting square SVG icons into properly formatted favicon packages for modern framework templates
- Enforcing brand consistency across desktop, mobile, and web interfaces by generating optimized Apple and Android launch icons
- Generating HTML and Next.js copy-paste link tags to quickly configure headers in modern web projects