Skip to content
Runs in browserNothing is uploaded

Generate a Favicon From Your Logo

Drop in a logo and get a favicon.ico containing the three classic sizes, the PNG icons that modern browsers and phones prefer, a web manifest, and the exact markup to paste into your head tag. Five files rather than the twenty-file packs that target browsers nobody runs any more, with a short explanation of what each one is for.

Use this without the search next time. Prathom Workbench puts Prathom's tools in your toolbar.

Add to Chrome — free

What it does

  • Multi-size favicon.ico with 16, 32, and 48px entries
  • Apple touch icon with a solid background
  • Android and PWA icons at 192 and 512
  • Ready-to-paste HTML and web manifest
  • Everything generated locally in the browser

How to use Favicon Generator

  1. 1

    Choose your source image

    An SVG or a square PNG of at least 512 pixels works best. A logo with fine detail will need simplifying — see the note below about 16 pixels.

  2. 2

    Add padding if the mark is tight

    A few percent of padding keeps a square logo from touching the edge of the tab icon. Leave it at zero for marks that already have their own margin.

  3. 3

    Set the iOS background color

    iOS renders transparency as black on home-screen icons, so pick the color that should sit behind your logo there.

  4. 4

    Download and install

    Take the ZIP, put the files in your site's root directory, and paste the HTML snippet into the head of every page.

How it works

The source image is decoded once, and the largest centerd square is taken from it so nothing is distorted. Each output size is then rendered from that square independently.

Rendering each size separately matters more here than anywhere else on this site, because the reductions are extreme. Going from a 1024-pixel logo to 16 pixels is a 64-fold reduction, and drawing that in one step samples roughly one source pixel in four thousand. The result is unpredictable — a thin line might vanish entirely or might land exactly on a sampled pixel and appear at full strength. Halving repeatedly averages the whole area into each output pixel, which is the difference between a recognizable shape and a colored smudge.

The ICO file is assembled by hand from those PNGs. An ICO is a small directory — six bytes of header, then sixteen bytes per image describing its size, bit depth, length, and offset — followed by the image data concatenated. Since Windows Vista the images may be PNGs rather than the original bitmap format, and every browser in use supports that, so this writer stores PNGs. It avoids implementing bitmap encoding, and more usefully it avoids the format's most notorious trap: in the bitmap layout the header's height field has to be twice the real height, to account for a transparency mask that is no longer used.

The Apple touch icon is the one file rendered onto an opaque background, because iOS composites home-screen icons over black rather than honoring their alpha channel.

What to check before you ship

Look at the 16-pixel version. It is the one that appears in browser tabs, it is the smallest thing your brand will ever be displayed at, and it is where most logos fail. Text of any kind becomes illegible. Thin strokes disappear. Two similar colors merge into one.

If it does not survive, the answer is a separate simplified mark rather than a different tool. Most well-known brands use a distinct icon at small sizes — a single letter, a symbol lifted out of the full lockup, or a solid shape with the letterform knocked out. That work happens in a design tool, before this one.

Installing the files

Put all five files in your site's root directory, so they are reachable at paths like /favicon.ico and /apple-touch-icon.png. Then paste the generated snippet into the head of every page — a shared layout or template, not each page by hand.

The sizes="any" attribute on the ICO link tells modern browsers not to bother downloading it when they have already found the PNG, while leaving it available for the ones that want it.

If icons do not change after you deploy, it is almost certainly caching. Favicons are cached unusually aggressively, by the browser and often by a CDN as well. A hard refresh frequently is not enough; opening the icon URL directly and reloading that is the reliable way to check what is actually being served.

Examples

A simple wordmark

logo.svg — 512 x 512, transparent background Padding 0%, iOS background #FFFFFF
favicon.ico — 15.2 KB (16, 32 and 48px inside) favicon-32x32.png — 1.1 KB apple-touch-icon.png — 6.4 KB, white background icon-192.png, icon-512.png site.webmanifest, HEAD-SNIPPET.html

The ICO is by far the largest file because it contains three complete PNG images in one container. That is normal and it is still under 16 KB, which is irrelevant next to any other asset on a page.

A detailed illustrated mark

mascot-full-color.png — 2000 x 2000 Padding 6%
Same five files, but the 16px version is largely unreadable

This is the case worth checking before you ship. A mascot with a face, outline, and background reduced to sixteen pixels becomes a colored smudge. The fix is not a better generator — it is a simplified mark for small sizes, typically a single letter or shape from the full logo.

Frequently asked questions

Do I still need a favicon.ico file at all?

Yes, and mostly for one specific reason: browsers and many other tools request /favicon.ico from your site root automatically, whether you declare it or not. Having a real file there avoids a 404 in your logs on every visit. It is also what appears in bookmarks and history entries in several browsers, which still prefer the ICO over a declared PNG.

Why does the ICO contain three sizes instead of one?

Because the browser picks the closest match to what it needs, and scaling a 32-pixel image down to 16 produces a blurrier result than a version drawn at 16 directly. Tabs typically use 16, bookmark bars and some menus use 32, and Windows shortcuts use 48. Including all three costs a few kilobytes and removes the guesswork.

Why does the Apple icon have a solid background?

Because iOS does not honor transparency on home-screen icons. A transparent PNG appears with a black background there, which almost never matches the design. iOS also applies its own rounded corners, so the icon should be a full square with the mark centerd rather than a pre-rounded shape.

My logo is wide. What happens to it?

The largest centerd square is taken, so the left and right ends of a wide wordmark will be cut off. Favicons are square and there is no way around that. For a wide logo, prepare a square version first — usually a single letter, a monogram, or the symbol part of the logo without the text — and use that as the source here.

What size should the source image be?

512 pixels square or larger, or an SVG at any size. Vectors are ideal because each output size is rendered fresh rather than scaled from a bitmap. If your only asset is a small PNG, the results at 192 and 512 will be soft, and it is worth recreating the mark at a higher resolution first.