Convert icon to favicon
How to turn an existing icon or logo mark into a favicon: simplify the artwork, prepare clean vector paths, export SVG, PNG and ICO files, add a dark-mode variant and verify the result.
Contents
The short answer
To turn an existing icon into a favicon, reduce it to a square mark that stays legible at very small sizes, clean up its vector paths, and export it as an SVG favicon, a multi-size ICO file and PNG versions for platforms that need them. Then reference those files in the page head and check them in browser tabs with both light and dark themes. A favicon is the small image a browser shows in tabs, bookmarks, history lists and some search interfaces.
A few terms are used throughout. Vector artwork is built from paths, which are outlines defined by anchor points and curves, so it can be scaled without blurring. Raster artwork, such as PNG, is a fixed grid of pixels. ICO is a container format that can hold several raster sizes of the same icon in one file, which lets older browsers and operating systems choose the size they need.
Before you start
- Confirm you have permission to use the icon. Owning a file, or finding it in a project folder, does not mean you are allowed to reuse a logo or modify it.
- Check what the source file actually contains. An .svg, .ai or .eps extension does not prove the artwork is pure vector or editable: it may contain an embedded bitmap, locked layers or live text that depends on a font you do not have. Open the file and inspect it in outline (wireframe) view; true vector shapes appear as editable paths, while an embedded image appears as a single rectangle.
- Decide which part of the logo becomes the favicon. A full lockup with a symbol and a wordmark is rarely readable at tab size. A standalone symbol, monogram or single letterform usually works better.
- Keep the original file untouched and work on a copy.
Step 1: Simplify the mark
Favicons are displayed far smaller than most logo applications, so detail that reads well on a business card turns into noise in a browser tab. Remove fine lines, small text, subtle gradients, drop shadows and thin outlines. Thicken strokes and widen gaps between shapes so they do not merge when pixels are averaged. If the icon depends on a tagline or small lettering, drop it. The goal is a recognizable silhouette, not a miniature copy of the full logo; this is a design recommendation rather than a technical requirement, but it is the main factor in whether the result is legible.
Step 2: Set up a square artboard
Favicons are square. Create a square artboard, center the simplified mark on it and leave a small, even margin so the shape does not touch the edges. If the icon is wide or tall, either crop it to its most recognizable portion or place it on a square background shape. For sharper raster exports, align important horizontal and vertical edges to whole pixel positions on the grid; edges that fall between pixels are rendered as soft, blurred lines at small sizes.
Step 3: Clean up paths and typography
- Convert any live text to outlines so the letterforms no longer depend on an installed font.
- Expand strokes into filled shapes so line weights render predictably in every browser and export tool.
- Merge overlapping shapes of the same color into single compound paths.
- Delete hidden objects, empty groups, stray anchor points and unused layers.
- Release or flatten clipping masks where possible, since they add complexity without visible benefit at small sizes.
- Remove effects, filters and blend modes that may not survive SVG export or that render differently across browsers.
- Use solid fills in a small number of colors.
Step 4: Plan for dark mode
Browser tab bars can be light or dark depending on the user's theme. A dark icon on a transparent background can almost disappear in a dark tab, and a light icon can vanish in a light one. There are two common ways to handle this.
- Use a contrasting background shape, such as a filled square or rounded square behind the mark. This works in every format, including PNG and ICO, because the icon carries its own contrast.
- Use an SVG favicon with an internal color-scheme media query that switches fill colors when the system or browser is in dark mode. This keeps a transparent background but only affects the SVG version.
Raster files (PNG and ICO) cannot switch colors on their own, so they need a design that remains visible on both light and dark backgrounds. Support for SVG favicons, and whether a browser re-evaluates the media query when the theme changes, varies by browser and version; test in the browsers your audience uses rather than assuming the switch will occur.
The fragment below shows the idea inside an SVG file. The class name and colors are placeholders; replace them with your own values and apply the class to the paths that should change.
<style>
.mark { fill: #1a1a1a; }
@media (prefers-color-scheme: dark) {
.mark { fill: #f2f2f2; }
}
</style>
<path class="mark" d="..." />
Step 5: Export the files
| File | Purpose | Notes |
| favicon.svg | Browsers that support SVG favicons | Scales cleanly; can carry the dark-mode media query; keep a square viewBox |
| favicon.ico | Older browsers and automatic fallback requests | Commonly packs 16, 32 and 48 pixel versions in one file |
| apple-touch-icon.png | Home-screen shortcuts on Apple devices | Commonly 180 by 180 pixels; use a solid background rather than relying on transparency |
| Manifest PNG icons | Installable web apps that use a web app manifest | Commonly 192 and 512 pixels; only needed if the site uses a manifest |
The sizes in the table are widely used conventions; platform requirements change over time, so confirm them against current browser and platform documentation before delivery.
For the SVG, remove editor metadata and comments, keep the viewBox attribute, make sure it is square, and confirm the file contains no embedded bitmap. For PNG exports, render each size from the vector source rather than scaling one PNG up or down, use the sRGB color space, keep transparency where the design calls for it, and strip unnecessary metadata. Check the smallest sizes individually; if the mark becomes muddy at 16 pixels, a simplified version made specifically for that size is a legitimate solution.
Many design applications cannot write ICO files directly. In that case, export the individual PNG sizes and combine them with a dedicated icon converter or a command-line image tool that can pack multiple sizes into one ICO. Menu names, command syntax and export options differ between applications and versions, and no specific tool was verified for this guide, so follow the documentation for the version you use.
Step 6: Reference the favicon in the page
Add link elements to the head of every page, adjusting file names and locations to match your site. Listing the ICO with a sizes value of any alongside the SVG lets browsers that support SVG favicons choose it while others fall back to the ICO.
<link rel="icon" href="favicon.ico" sizes="any">
<link rel="icon" href="favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
Some browsers also request an ICO file from the site root automatically even without a link element, so placing favicon.ico there provides an extra fallback.
Step 7: Verify the result
- Open the site in a browser tab with a light theme and then a dark theme, and confirm the icon is clearly visible in both.
- Check the icon in bookmarks, history and pinned tabs, where it may be shown at different sizes.
- Use a private window or clear the cache before checking, because browsers cache favicons aggressively and may keep showing an old version.
- In the browser developer tools, open the network panel and confirm each favicon file loads without an error.
- Open favicon.svg directly in a browser to confirm it renders on its own and shows the expected colors.
- If you created an Apple touch icon, add the site to a home screen on a test device and confirm the background and edges look correct.
- Compare the smallest raster sizes against the original mark to confirm the silhouette is still recognizable.
Gaps to check yourself
No tested measurements or version-specific data were available for this guide. Current browser support for SVG favicons and dark-mode switching, the exact sizes each platform requests, and the export commands in your design or conversion software should be confirmed in up-to-date official documentation before you finalize and deliver the files.