Favicon: worked example step by step
This post makes one favicon from start to finish, with every number shown. The site is a food blog called Basil, so the letter is B and the colour is green, and the job is to produce five files — 16, 32, 48, 180 and 192 pixels — from one drawing at 512 pixels, then link them in the page head. Follow the steps in order and you will have a working favicon in a few minutes. The Favicon Generator does the drawing and the exports in the browser, so you can follow along.
Step 1: draw the letter at 512 pixels
Open the generator, type the letter B, and pick a green background. The drawing is made on a square canvas 512 pixels on each side — 512 × 512, or 262,144 pixels in total. The letter is drawn bold and centred, about 350 pixels tall, with a margin of roughly 80 pixels on each side so it never touches the edge. This is the master file, and every smaller size is shrunk from it, so keep it: any size you ever need comes from here, never from a smaller file.
Step 2: export the small sizes — 16, 32 and 48
From the 512-pixel master, export three small files. The 16-pixel file is 16 × 16, or 256 pixels: the browser tab icon, and the one that matters most. The letter inside it is about 11 pixels tall, small but readable, because B is bold with strong contrast against the green. The 32-pixel file is 32 × 32, or 1,024 pixels — the same tab icon for high-resolution screens. The 48-pixel file is 48 × 48, or 2,304 pixels, for the Windows taskbar. Check the 16-pixel file before going on: if the B reads there, the set is sound.
master: 512 × 512 = 262,144 px tab: 16 × 16 = 256 px (1 in 1,024 kept) retina tab: 32 × 32 = 1,024 px taskbar: 48 × 48 = 2,304 px
Step 3: export the large sizes — 180 and 192
Phones need the two large files. The Apple touch icon is 180 × 180, which is 32,400 pixels — the icon iPhones show when someone saves the site to their home screen. The Android icon is 192 × 192, which is 36,864 pixels, 4,464 more than the Apple one. Both come from the same 512-pixel master, so the letter and the green match exactly, and the B is about 130 pixels tall with smooth curves. Save them as favicon-180.png and favicon-192.png, next to the small files.
Step 4: link them all in the page head
Put the five files in the site's main folder and add one link tag for each in the head of every page, with the sizes attribute matching the file. Each browser then picks the size it wants: the tab takes 16, a retina screen takes 32, the taskbar takes 48, an iPhone takes 180 and an Android phone takes 192. Load the site and look at the tab — a green square with a white B — then save the site to a phone home screen and check there too. If both show the letter, the example is done: one drawing, five files, six sizes counting the master.
What to do when it looks wrong
Three things go wrong most often, and each has a clear fix. A blank tab means the 16-pixel file is missing or the link tag points at the wrong filename — check the spelling first. An unreadable letter at 16 pixels means the letter is too thin or the contrast too weak — pick a bolder letter or a darker background and re-export from the 512 master. A soft phone icon means the 180 or 192 file is missing and the phone is stretching the small one — add the large file and its link tag. In every case, go back to the master file: it is the only file with enough pixels to fix anything.
Frequently asked questions
What size should I draw a favicon at first?
512 × 512 pixels, which is 262,144 pixels. Every smaller size is shrunk from this master file, never stretched up from a small one.
Which favicon sizes do I need to export?
Five files: 16, 32, 48, 180 and 192 pixels. The tab uses 16, retina tabs use 32, the taskbar uses 48, Apple uses 180 and Android uses 192.
How do I add the favicon to my site?
Put the files in the site's main folder and add one link tag per size in the head of each page, with the sizes attribute matching the file.
Why is my favicon blurry on a phone?
The 180 or 192 file is missing, so the phone is stretching the 16-pixel file. Export the large sizes from the 512 master and link them.
More guides on the Favicon Generator
Try the Favicon Generator — free, in your browser.