How to convert SVG to ICO
- Drop your SVG into the box above, choose it from disk, or paste the SVG code anywhere on the page.
- Pick the sizes. Favicon (16, 32, 48) is right for a website; Windows app icon adds 24, 64, 128 and 256 for desktop shortcuts and installers.
- Check the previews at their real pixel size. If a detail disappears at 16×16, it will disappear in the browser tab too.
- Download the .ico. The page also gives you an
apple-touch-icon.pngat 180×180 and the SVG itself, plus the three<link>tags that reference them.
What a favicon setup needs today
A modern site usually ships three files. The SVG favicon is used by current desktop browsers and stays sharp at any density. The .ico sits at /favicon.ico as the fallback, because browsers and many crawlers request that path even when the page declares nothing. The 180×180 PNG is what iOS uses when someone adds the site to the home screen.
<link rel="icon" href="/favicon.ico" sizes="any"> <link rel="icon" href="/icon.svg" type="image/svg+xml"> <link rel="apple-touch-icon" href="/apple-touch-icon.png">
sizes="any" on the .ico line stops some browsers from preferring the ICO over the SVG. If the SVG is large or comes from a design tool, run it through the SVG optimizer first: the SVG favicon is downloaded on every first visit, so its byte count matters more than the .ico's.
PNG or BMP inside the .ico: measured
An .ico file is a small directory followed by one image per size. Each image can be stored as a PNG, which Windows has accepted since Vista and every current browser reads, or as an uncompressed BMP, the original format. We converted five real icons with this tool and recorded the file sizes.
| Source SVG | 16/32/48, PNG | 16/32/48, BMP | 16–256 (7 sizes), PNG | 16–256, BMP + PNG 256 |
|---|---|---|---|---|
| TypeScript logo (Simple Icons) | 1,389 B | 15,086 B | 8,446 B | 106,288 B |
| Lucide heart (stroke icon) | 1,921 B | 15,086 B | 13,354 B | 108,946 B |
| GitHub logo (Simple Icons) | 1,960 B | 15,086 B | 13,222 B | 108,758 B |
| Figma logo (Simple Icons) | 1,917 B | 15,086 B | 12,859 B | 108,495 B |
| React logo (Simple Icons) | 2,538 B | 15,086 B | 20,125 B | 112,623 B |
Two things stand out. The BMP column is identical for every icon, because a 32-bit BMP stores four bytes per pixel plus a transparency mask whatever the picture is: 16, 32 and 48 pixels always add up to 15,086 bytes. And PNG entries make the favicon six to eleven times smaller. That is why this tool defaults to PNG. Choose BMP only for a Windows XP-era target or an old icon editor that refuses PNG entries.
Why each size is rendered from the vector
Many converters render the SVG once at 256×256 and shrink that bitmap for the smaller sizes. Downscaling averages neighbouring pixels, so a one-pixel line at 16×16 turns into a grey smear. Here the SVG is re-rendered at each target size instead: the browser rasterizes the vector directly onto a 16×16, 32×32 or 48×48 canvas, which keeps edges aligned to the pixel grid as well as the drawing allows.
It still cannot invent detail. A logo with fine text or thin outlines will be unreadable at 16 pixels no matter how it is rendered. Icon designers handle this with a simplified small version; if your previews above look muddy, that is the fix, not a different converter. The SVG vs PNG page covers where vector and bitmap formats each make sense.
Common problems when converting SVG to ICO
- The icon is black. Stroke icon sets use
currentColor, which has no color outside a page. Set a real color in the SVG first. - The drawing is cropped. The SVG has no
viewBox, so resizing cuts it off. The tool adds one when it can; see how viewBox works to fix the source. - The icon is blank. Check the path data for
NaNvalues, which some optimizer builds produce and every renderer silently ignores. The NaN path check explains how to find them. - Text uses the wrong font. Web fonts and external CSS are not loaded when an SVG is drawn as an image. Convert text to outlines before exporting.
- Windows still shows the old icon. Explorer caches icons aggressively. Rename the file or clear the icon cache before deciding the new file is wrong.
Frequently asked questions
Which sizes should a favicon.ico contain?
16, 32 and 48 pixels covers browser tabs, bookmarks, high-density tabs and the Windows taskbar shortcut. Adding 256 only matters if the same file is used as a Windows application or desktop icon. Larger sizes in a favicon just make every first visit download more bytes.
Do I still need a favicon.ico if I have an SVG favicon?
Yes, as a fallback. Browsers request /favicon.ico by default when a page declares nothing, some feed readers, email clients and older browsers do not read SVG icons, and an SVG favicon cannot be shown where the consuming software does not render SVG. Ship both: link the SVG for browsers that support it and keep the .ico at the site root.
Should the images inside the ICO be PNG or BMP?
PNG for a favicon. In our tests a 16/32/48 icon was 1.4–2.5 KB with PNG entries and 15,086 bytes with BMP entries. BMP size depends only on pixel count, not content, so it never gets smaller. Use BMP entries only when the file must open in very old Windows versions or icon editors that predate PNG-in-ICO.
Is my SVG uploaded to a server?
No. The SVG is read, rendered on a canvas and packed into the .ico inside your browser tab. The page itself still loads its analytics and ad scripts, but your file is never sent anywhere.
Why is my icon black when the SVG looks colored in my editor?
The SVG probably uses currentColor, which inherits the text color of the page it is placed in. Rendered on its own, as it is when converted, currentColor resolves to black. Lucide, Feather and Heroicons all ship this way. Replace currentColor with a real color before converting.
Why does my SVG come out cropped or tiny?
Usually because it has no viewBox. Without one, setting a new width and height crops the drawing instead of scaling it. This tool adds a viewBox from the width and height attributes, or measures the drawing when both are missing, but a file whose content sits far outside its declared box can still look off. Fixing the viewBox in the source is the reliable cure.
Can I convert a non-square SVG?
Yes. ICO images are square, so a wide or tall SVG is scaled to fit and centered, with transparent space on the short side. Use the padding slider if the icon touches the edges, or the background option if the space should be filled.
Does text in my SVG convert correctly?
Only if the font is available to the browser without loading anything. An SVG rendered as an image cannot fetch web fonts or external stylesheets, so text falls back to a default font. Convert text to paths in your design tool before exporting, which is what icon sets do anyway.