Skip to content

Create favicon.ico and PNG icons offline on Windows, for one site or many

The icon files a website needs, made on your computer: favicon.ico with a few lines of Python first, then the whole set for several sites in one run.

We make Favicon Generator, the app this guide uses. The free methods come first; every step shown in Favicon Generator was checked in the app itself, and the screenshots come from the real app with invented sample data.

Short answer

For favicon.ico alone, a few lines of Python with the free Pillow library do the job on your PC, with no upload. Paste a wide logo onto a square first, or the icons keep its shape. A website also uses PNG icons for phones, a web app manifest and a few lines in each page's head: Favicon Generator makes that whole set offline, for one site or several in one run, and only reads your logos.

What a website needs, besides favicon.ico

A favicon.ico file is not one picture. Microsoft's page About Icons explains that an icon file holds several images of different sizes, typically 16, 32, 48 and 256 pixels. For search results, Google's page Define a favicon to show in search results asks for a square icon of at least 8 by 8 pixels, recommends one larger than 48 by 48 pixels, and reads it from a <link rel="icon"> line in the page's head.

Phones and installed web apps look for more than the .ico: an Apple touch icon, PNG icons of 192 and 512 pixels and a web app manifest that lists them. The set Favicon Generator makes (Method 2) shows the files in practice.

Many converters that come up for this search are websites, so the logo is uploaded. That is fine for a published logo and less so for a brand that is not public yet: ezgif's PNG to ICO page, for example, uploads the file by default, says uploads are deleted after an hour, and offers a local processing option in the browser.

Method 1 (free): favicon.ico with Python and Pillow

With Python 3 and the Pillow package installed, three lines make a favicon.ico on your PC; run them from the folder that holds the logo. We ran them on 30 November 2026 (Python 3.11.9, Pillow 12.2.0, Windows 11) on an invented logo of 1200 by 800 pixels; the last line reads back the sizes stored in the file:

from PIL import Image
img = Image.open("harbor-cafe.png")   # 1200 x 800 px
img.save("favicon.ico", sizes=[(16, 16), (32, 32), (48, 48)])
print(sorted(Image.open("favicon.ico").info["sizes"]))
[(16, 11), (32, 21), (48, 32)]

The file was written, but its icons are 16 by 11, 32 by 21 and 48 by 32 pixels: Pillow keeps the logo's shape instead of making the square icons Google asks for. Pasting the logo onto a transparent square first fixes it:

from PIL import Image
img = Image.open("harbor-cafe.png").convert("RGBA")
side = max(img.size)
square = Image.new("RGBA", (side, side), (0, 0, 0, 0))
square.paste(img, ((side - img.width) // 2, (side - img.height) // 2))
square.save("favicon-square.ico", sizes=[(16, 16), (32, 32), (48, 48)])
print(sorted(Image.open("favicon-square.ico").info["sizes"]))
[(16, 16), (32, 32), (48, 48)]

That is a correct favicon.ico, and it is the only file these lines make: the PNG icons, the manifest and the head lines are still to write by hand, once per site. The PNG to ICO guide on DEV gives the same job as an ImageMagick command (-define icon:auto-resize) and a Node script; ImageMagick is not installed on the PC used for this guide, so we did not run that one.

Method 2: the whole icon set with Favicon Generator

Favicon Generator is our Windows app for this job. It takes one image or SVG per site and makes the ICO, the PNG icons for browsers and phones, the web app manifest and the HTML lines to paste, with a preview on light and dark tabs. It works offline, and a batch of logos gives one set per site. The screenshots below come from version 1.0.0 (evaluation build) with invented logos.

  1. Add the logos. Add logos or Add folder puts each logo in the list as one site, with its size and status. In our test, six files went in: an SVG, a wide PNG, a JPEG and an old .ico were ready, while a damaged PNG and a PDF brand guide were listed as files that cannot be used, with the reason.
  2. Check each site's settings. The site name, the short name shown under the icon on phones, the shape (Fit centres the whole image on a transparent square; Fill cuts it to the square), the padding, the theme color for the browser bar on phones and the background color of the Apple and Android icons. Use for all sites copies the shape, padding and background to every site in the list; names and theme colors stay per site.
  3. Set the icon folder. The folder where the files will be on the site, such as /assets/icons/; the HTML lines point to it.
  4. Read the preview and copy the HTML. The preview shows the tab in a light and a dark browser at 16 and 32 pixels, the icon on an iPhone and an Android home screen, and the 512 pixel icon.
  5. Create the icon sets. Each site gets a new folder, named after it, in the output folder. Nothing is overwritten, and the logos are only read.
Favicon Generator with six logos in the list and an SVG logo selected: its icon on light and dark browser tabs, on iPhone and Android home screens, and the five HTML lines to paste into each page's head.
An SVG logo: the tab preview in light and dark, the phone icons and the HTML for the head. Favicon Generator 1.0.0 (evaluation build), tested 30 November 2026, invented logos.

For the SVG logo, these are the lines the app wrote into the set's favicon-snippet.html:

<link rel="icon" href="/assets/icons/favicon.ico" sizes="32x32">
<link rel="icon" href="/assets/icons/favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/assets/icons/apple-touch-icon.png">
<link rel="manifest" href="/assets/icons/site.webmanifest">
<meta name="theme-color" content="#1d3782">

The wide logo that Pillow kept wide gets a check before anything is made: the image is not square, so it is fitted or cut to a square, as chosen. The favicon.ico the app made from it holds square icons of 16, 32 and 48 pixels (we read the file back with Pillow after the run).

The wide Harbor Cafe logo of 1200 by 800 pixels selected, with the check that the image is not square and will be fitted to a square, a padding of 6 percent and a preview of the centred icon.
A wide PNG logo with its check before the set is made; Fit centres it on a transparent square. Favicon Generator 1.0.0 (evaluation build), tested 30 November 2026.
The Icon sets created window: four sets made in the output folder, 7 files each and 8 for the SVG logo, whose favicon.svg had a comment, a metadata block and editor attributes removed.
One run, four sites: a folder per set, and the logos only read. Favicon Generator 1.0.0 (evaluation build), tested 30 November 2026.
How to Make a Favicon from One Image (All Sizes + HTML Code)1:05Watch on YouTubeNothing loads from YouTube until you press play. The player then loads from youtube-nocookie.com, YouTube's privacy-enhanced mode, and connects to Google's servers. Privacy

Put the set on each site

  • Each set holds favicon.ico, apple-touch-icon.png, icon-192.png, icon-512.png, icon-maskable-512.png, site.webmanifest and favicon-snippet.html; a set made from an SVG also holds favicon.svg. Copy the files of a set into the icon folder of its site.
  • Paste the lines of favicon-snippet.html into the head of every page of that site, or into the template that writes the head.
  • Check the manifest: it carries the site name, the short name, the theme and background colors and the three PNG icons.
  • If you look after several sites, keep each set with its site: the HTML lines name the icon folder you set, not the site.

The same logos usually need other sizes for the site itself: our guide to preparing images for a website on Windows covers resizing and compressing them on your PC.

Limitations

  • The Pillow lines make favicon.ico only, and keep the shape of a logo that is not square unless you pad it first. The PNG icons, the manifest and the HTML are left to you.
  • Favicon Generator makes the files and the lines to paste; it does not upload them to your site or edit your pages. A damaged image or a file that is not an image (a PDF, in our test) is listed as unusable and gets no set.
  • Whether and when a favicon appears in Google's results is Google's decision; its page lists the rules it applies.
  • Favicon Generator's planned requirements: Windows 10 (22H2) or 11, 64-bit.

References