How to make a favicon from your logo (sizes, ICO, SVG and the HTML)
A favicon is the tiny picture in a browser tab, a bookmark list, a phone home screen, and next to your site in Google results. Most logos don’t survive being shrunk to 16 pixels unchanged, so making a good favicon is less about file conversion and more about choosing the right part of your logo. This guide covers which mark to use, the handful of files a site actually needs in 2026, the exact HTML, tested commands to produce every size from one SVG, and how to get the icon shown in Google Search.
Short answer: start from a square icon version of your logo (a symbol or monogram, not the full wordmark). Export four files: favicon.ico (16 and 32 px), icon.svg, apple-touch-icon.png (180×180) and 192 px and 512 px PNGs for a web app manifest. Link them in the <head> of your home page. For Google Search, the icon must be square, larger than 48×48 is recommended, and SVG is not one of the formats Google lists, so keep the ICO or a PNG linked too.
Making a favicon from logo artwork: pick the right part
At 16×16 pixels you have 256 pixels to work with. A horizontal logo with a name in it turns into a gray smudge. What works:
- A symbol on its own. If your logo has an icon next to the name, use just the icon.
- A monogram or a single letter. One or two bold letters, if the brand has no symbol. For a side project or a new brand, a single letter on a colored square is a fast way to get a recognizable favicon.
- A solid shape behind it. A filled square or rounded square makes the icon readable on both light and dark browser tabs.
- Fewer details. Thin strokes, gradients with low contrast, and small counters disappear. Simplify for the small sizes if you need to; a favicon can be a reduced version of the logo.
Our free logo generator exports an “SVG app icon” for every logo: a 120×120 square with the symbol on a solid background, which is a good starting point for everything below.
Favicon sizes and file formats: the files you actually need
Old guides list twenty sizes. Modern browsers need far fewer:
| File | Size | Used by |
|---|---|---|
favicon.ico | 16×16 and 32×32 inside one file | Every browser, older tools, feed readers, and anything that requests /favicon.ico directly |
icon.svg | Any (vector) | Current Chrome, Edge, Firefox and Safari 26 or later; sharp at every size |
apple-touch-icon.png | 180×180 | iPhone and iPad home screens |
icon-192.png, icon-512.png | 192×192, 512×512 | Android home screens and installable web apps, through a manifest |
In short, the favicon sizes that matter are 16, 32, 180 (the Apple touch icon), 192 and 512 px, plus an SVG for any size. Put favicon.ico at the root of the site (/favicon.ico), because some clients request that URL without reading your HTML.
The HTML
Add this to the <head> of every page, or at least the home page:
<link rel="icon" href="/favicon.ico" sizes="32x32">
<link rel="icon" href="/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="manifest" href="/manifest.webmanifest">
The sizes="32x32" on the ICO line helps browsers that understand SVG prefer the SVG. The manifest is a small JSON file:
{
"name": "Your Brand",
"icons": [
{ "src": "/icon-192.png", "type": "image/png", "sizes": "192x192" },
{ "src": "/icon-512.png", "type": "image/png", "sizes": "512x512" }
]
}
If you only need a favicon and not a home-screen icon, the first and third lines are enough.
Make every size from one SVG
Any design tool can export these sizes. If you prefer the command line, these commands use librsvg (rsvg-convert) to render the SVG and ImageMagick 7 to pack the ICO. We ran them on an icon downloaded from our generator; they work the same on macOS (Homebrew), Linux, and Windows (WSL).
rsvg-convert -w 16 -h 16 icon.svg -o favicon-16.png
rsvg-convert -w 32 -h 32 icon.svg -o favicon-32.png
rsvg-convert -w 180 -h 180 icon.svg -o apple-touch-icon.png
rsvg-convert -w 192 -h 192 icon.svg -o icon-192.png
rsvg-convert -w 512 -h 512 icon.svg -o icon-512.png
magick favicon-16.png favicon-32.png favicon.ico
Check the result with magick identify favicon.ico; it should list a 16×16 and a 32×32 image. Two practical notes:
- Render SVG with librsvg, not ImageMagick’s built-in reader. In our test, converting the SVG directly with
magickproduced a grayscale image;rsvg-convertkept the colors exactly. - Give the Apple icon a solid background. iOS draws its own rounded corners and does not handle transparency well. If your SVG has transparent edges, add a background color with
rsvg-convert -b '#ffffff' …, or use a square version of the icon.
Look at the 16 px and 32 px files zoomed in before you ship them. If the shape is mush, simplify the SVG for the small sizes.
Optional: a dark-mode SVG favicon
Because an SVG favicon is a real SVG document, it can contain a media query. Browsers that support it switch colors with the system theme:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<style>
path { fill: #111827; }
@media (prefers-color-scheme: dark) { path { fill: #ffffff; } }
</style>
<path d="…your shape…"/>
</svg>
This is optional. A symbol on a solid background usually reads well in both themes without it.
Getting your favicon into Google search results
Google shows a site’s favicon next to its results when it can. According to Google’s favicon guidelines:
- The
<link rel="icon">(orapple-touch-icon) must be on the home page of the hostname. One favicon per hostname; a subfolder cannot have its own. - The icon must be square and at least 8×8 px; Google recommends larger than 48×48.
- The listed formats are BMP, GIF, ICO, PNG, JPEG, PPM and TIFF. SVG is not listed, so don’t rely on an SVG-only setup for Search.
- Googlebot must be able to crawl the home page and Googlebot-Image must be able to fetch the icon file; neither may be blocked in
robots.txt. - Keep the URL stable, and expect days to weeks before a change shows up. Meeting the guidelines does not guarantee the icon is shown.
A practical setup that satisfies all of this: link the 180×180 apple-touch-icon.png or a 48 px or larger PNG alongside the ICO and SVG.
Checking the favicon on different devices
The same favicon is visible in very different places: a browser tab on desktop, the bookmark icon in the bookmarks bar, a home screen shortcut on iOS and Android mobile devices, and the search results page. Before you publish, open the site on each and check that users can still recognize your brand at very small sizes. If you designed the icon in design software such as Figma or Illustrator, export a preview at 16 and 32 px and look at it at 100% zoom, not enlarged.
Using a favicon generator
If you’d rather not run commands, an online favicon generator does the same job: you upload one image (ideally the square SVG or a 512×512 PNG of your icon), the generator produces multiple sizes, and you download a zip with the files and the HTML tags to paste into your site. For the best results with any favicon generator:
- Start from the icon, not the full logo. Whatever tool you use, the output sizes can only be as good as the source. A wordmark shrunk to 16 px is still unreadable.
- Prefer high contrast. A small icon in your brand colors on a solid background is easier to recognize in a browser tab or the bookmarks bar than a thin outline.
- Check what it gives you. Make sure the zip includes the files in the table above, with the right icon sizes, and that the tags point to where you upload them on your server.
- Preview on real devices. Look at the favicon in a desktop browser tab, on a mobile home screen and in a bookmark list, in light and dark themes.
Our free logo generator isn’t a favicon generator, but its “SVG app icon” export is a square source file you can feed to one, or to the commands above. A clear, consistent favicon is a small part of your brand identity that people see every time they open your site, so it’s worth a few minutes.
Common mistakes
- Using the full horizontal logo. It becomes unreadable. Use the symbol.
- Non-square images. Browsers and Google squash or reject them. Pad to a square instead.
- Forgetting
/favicon.ico. Some clients only ever ask for that path. - Changing the file but not the URL, then wondering why nothing updates. Browsers cache favicons aggressively. Test in a private window, and if needed add a version to the URL (
/icon.svg?v=2). - Blocking the icon in robots.txt, often by disallowing an
/assets/folder.
If you keep a dated record of your logo files, remember that a favicon is a new file with its own bytes and hash; see SHA-256 for designers for why. For which master formats to keep, see logo file formats.
Quick answers
What size should a favicon be?
Ship a favicon.ico containing 16×16 and 32×32, an SVG icon, a 180×180 apple-touch-icon.png, and 192×192 and 512×512 PNGs for a web app manifest. For Google Search, Google recommends a square icon larger than 48×48.
Can I use my whole logo as a favicon?
Usually not. A horizontal logo with a name becomes unreadable at 16 pixels. Use the symbol or a monogram on a solid square background.
Does Google support SVG favicons?
Google's favicon guidelines list BMP, GIF, ICO, PNG, JPEG, PPM and TIFF, not SVG. Keep an ICO or PNG linked from your home page alongside any SVG icon.
Why isn't my new favicon showing?
Browsers cache favicons heavily and Google can take days to weeks to recrawl. Test in a private window, add a version to the icon URL, and make sure robots.txt doesn't block it.