What a favicon is and why it matters
A favicon is the small icon that appears in your browser tab, next to your website's name. It's also the image that shows up in bookmarks, browser history, and search results on some devices. When someone has multiple tabs open, a recognizable favicon helps them find your site faster.
Favicons are typically 16×16 pixels or 32×32 pixels, though modern browsers scale them automatically. You create one image file, upload it to your website, and add a single line of code to your HTML. The browser does the rest.
Without a favicon, browsers display a generic page icon or nothing at all. A custom favicon takes seconds to set up and makes your site look more polished and professional.
Key Takeaways
- A favicon is a small image file that appears in browser tabs and bookmarks, created as either a .ico, .png, or .svg file.
- You can create a favicon using free online tools, image editors like Photoshop or GIMP, or by converting an existing image.
- The favicon file goes in your website's root directory or a specific folder, and you link to it in the <head> section of your HTML.
- Modern browsers support multiple favicon formats and sizes, so a single 32×32 PNG file works for most websites.
- After uploading and linking the favicon, you may need to clear your browser cache or do a hard refresh to see the change.
Creating a favicon from scratch
Start by deciding what your favicon will be: a simplified version of your logo, your initials, a symbol, or a simple shape. Keep it simple—details disappear at 16×16 pixels, so avoid thin lines, small text, or complex gradients.
Open an image editor like Photoshop, GIMP (free), or Affinity Photo. Create a new image at 32×32 pixels or 64×64 pixels (larger sizes give you more room to work, and the browser will scale it down). Design your icon in a single color or a limited palette. Save the file as a PNG.
If you don't have design software, use a free online favicon generator like Favicon.io, Real Favicon Generator, or Canva. These tools let you upload text, choose colors, and download the result in seconds. Most also generate multiple file formats automatically.
Converting an existing image into a favicon
If you already have a logo or image you want to use, you can convert it. Open the image in any image editor and resize it to 32×32 pixels or larger. Crop it to a square if it isn't already. Save it as PNG or JPG.
Then use an online converter like CloudConvert, Favicon Converter, or Convertio to change the file format to .ico if needed. Upload your image, select ICO as the output format, and download the result. Some converters also let you upload a PNG directly and it will work as a favicon without conversion.
Test the result by opening it in your image viewer—it should still be recognizable at small sizes. If text or details blur, simplify the design and try again.
Uploading the favicon to your website
Upload your favicon file to your website's root directory (the main folder where your index.html or home page lives). Most hosting providers let you upload files through a file manager in your control panel, or via FTP using software like FileZilla.
Name the file favicon.ico if you're using the ICO format. If you're using PNG, name it favicon.png. Some developers use favicon-32x32.png or favicon-16x16.png to indicate the size, but a single name works fine.
If your website uses a CMS like WordPress, Shopify, or Wix, there's usually a settings page for uploading a favicon directly—you won't need to touch the file system at all. Look for "Site Icon", "Favicon", or "Branding" in your settings.
Linking the favicon in your HTML
Open the HTML file for your website's home page (usually index.html). Find the <head> section at the top of the file, between <head> and </head>.
Add one of these lines, depending on your file format:
For an ICO file: <link rel="icon" type="image/x-icon" href="/favicon.ico">
For a PNG file: <link rel="icon" type="image/png" href="/favicon.png">
For an SVG file: <link rel="icon" type="image/svg+xml" href="/favicon.svg">
Place this line after your <title> tag and before the closing </head> tag. If you have multiple pages, add the same line to the <head> of each one, or include it in a shared header template if your site uses one.
Save the file and upload it to your server. The favicon should appear in your browser tab within a few seconds.
Troubleshooting when your favicon doesn't appear
If you don't see your favicon after uploading and linking it, the most common cause is browser cache. Your browser may be holding onto the old (missing) favicon. Do a hard refresh by pressing Ctrl+Shift+R on Windows or Cmd+Shift+R on Mac. Close the tab completely and reopen it, or try a different browser.
Check that the file path in your HTML matches the actual location of the favicon file. If your favicon is in a folder called images, the link should be href="/images/favicon.png". If the path is wrong, the browser won't find the file.
Verify that the file was uploaded successfully by visiting it directly in your browser. If your favicon is at the root, type your-domain.com/favicon.ico into the address bar. If the image appears, the file is there. If you get a 404 error, the file didn't upload or is in the wrong location.
Make sure the file format matches the type attribute in your link tag. If you're linking to a PNG but the file is actually a JPG, it won't work. Download the file again and check its actual format.
Using multiple favicon sizes and formats
Modern websites often include several favicon sizes and formats to cover different devices and contexts. A smartphone home screen icon needs a larger image than a browser tab. Here's a practical setup that works across most devices:
| File | Size | Format | Used for |
|---|---|---|---|
| favicon.ico | 32×32 or 64×64 | ICO | Browser tabs, bookmarks, fallback |
| favicon-32x32.png | 32×32 | PNG | Browser tabs, modern browsers |
| apple-touch-icon.png | 180×180 | PNG | iPhone and iPad home screen |
| android-chrome-192x192.png | 192×192 | PNG | Android home screen |
To use multiple files, add these lines to your <head>:
<link rel="icon" type="image/x-icon" href="/favicon.ico"> <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"> <link rel="apple-touch-icon" href="/apple-touch-icon.png"> <link rel="icon" type="image/png" sizes="192x192" href="/android-chrome-192x192.png">
You don't need all of these—a single 32×32 PNG works for most websites. Add the others only if you want to optimize for specific devices.
Frequently Asked Questions
What's the difference between ICO, PNG, and SVG favicons?
ICO is the traditional favicon format and works in older browsers. PNG is simpler to create and works in all modern browsers. SVG is a vector format that scales perfectly to any size and supports animation, but older browsers don't recognize it. For most websites, PNG is the best choice—it's easy to create, widely supported, and small in file size.
Can I use an animated favicon?
Yes, but only with animated GIF or APNG formats. Create an animated GIF in an image editor or online tool, upload it as your favicon, and link to it the same way you would a static PNG. Not all browsers support animated favicons, so use animation sparingly and make sure your site works without it.
Do I need a favicon for my website to work?
No. A favicon is purely visual and doesn't affect how your website functions. Browsers will display a generic icon if you don't provide one. However, a custom favicon makes your site look more professional and helps visitors recognize your site in their browser tabs and bookmarks.
How do I update my favicon after I've already created one?
Replace the old favicon file with the new one, keeping the same filename. Then do a hard refresh in your browser (Ctrl+Shift+R or Cmd+Shift+R) to clear the cache. If you're changing the filename, update the link in your HTML to match the new name.
What size should my favicon be?
A 32×32 pixel PNG works for almost all modern browsers and devices. If you want to support older browsers or specific devices, create additional sizes: 16×16 for older browsers, 180×180 for Apple devices, and 192×192 for Android. Most online favicon generators create multiple sizes automatically.