oktools

Favicon Generator

Make a complete favicon set from a logo or from a letter or emoji: favicon.ico with 16, 32 and 48 pixel images, PNG icons for browsers, iPhone and Android, an SVG favicon, a site.webmanifest and the HTML tags that link them. Everything is drawn by your own browser — your image is never uploaded.

Source

One to three characters.
#ffffff
#2563eb

App details

The label under a home-screen icon; about 12 characters fit.
#2563eb
Tints the browser bar on Android.
#ffffff
The splash screen, and the fill behind apple-touch-icon.png.

Preview

Your icons appear here

Add an image or switch to Text. Every size is redrawn as soon as you change the source.

HTML

<link rel="icon" href="/favicon.ico" sizes="32x32">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="icon" href="/favicon-32x32.png" type="image/png" sizes="32x32">
<link rel="icon" href="/favicon-16x16.png" type="image/png" sizes="16x16">
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180">
<link rel="manifest" href="/site.webmanifest">
<meta name="theme-color" content="#2563eb">

Put every file in the root of your site, next to index.html — the public/ or static/ folder in most frameworks — and paste these tags into the <head> of each page. favicon.ico should stay at the root even if you move the others, because some browsers and crawlers ask for /favicon.ico without reading the page.

How it works

Every file in the set is drawn from one source. An uploaded image is opened by the browser’s own decoder and drawn onto a fresh square canvas for each size, either fitted whole with transparent bars on the short sides (contain) or cropped to its centre square (cover), and each canvas is saved as a PNG. The text source works the same way, with one step in front: your characters, font, colours, shape and padding are first written out as a small SVG, and that SVG is both the favicon.svg in the download and the image every PNG is drawn from — so the vector icon and the bitmaps cannot disagree.

favicon.ico is assembled byte by byte in the page. An ICO file is a 6-byte header, a 16-byte directory entry per image giving its width, height, colour depth, length and offset, and then the images themselves; since Windows Vista those images may be complete PNG files, which is what this tool writes for 16, 32 and 48 pixels. The 16 and 32 pixel entries are the very same PNGs as favicon-16x16.png and favicon-32x32.png.

apple-touch-icon.png is the only opaque file: its canvas is filled with the app background colour before the icon is drawn. The manifest and the HTML snippet are plain text built from the app details and updated as you type; the images are redrawn a quarter of a second after the last change to the source, so dragging a slider does not queue dozens of renders.

Examples

Two letters on a circle

Two characters get a font size of half the padded area; the font stack is written into the file, which is why only system fonts are offered. The apostrophes are escaped because the whole list sits in one attribute.

Text source
Text: Ab   Font: Monospace   Shape: Circle
Text colour: #ffffff   Background: #0f766e   Padding: 10%
favicon.svg
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">
  <circle cx="50" cy="50" r="50" fill="#0f766e"/>
  <text x="50" y="50" text-anchor="middle" dominant-baseline="central" font-family="ui-monospace, &apos;SF Mono&apos;, Menlo, Consolas, &apos;Liberation Mono&apos;, monospace" font-size="40" font-weight="700" fill="#ffffff">Ab</text>
</svg>

A wide logo, contained or covered

The geometry for the 512-pixel Android icon from a 1200 × 630 image. Contain keeps the whole logo and centres it with 121 transparent rows above; cover keeps the middle 630 × 630 square and drops 285 pixels from each side. At 16 pixels, contain leaves the logo only 8 pixels tall — a wide wordmark rarely survives as a favicon.

Input
logo.png — 1200 × 630, output 512 × 512
Output
contain: source 0,0 1200×630 → canvas 0,121 512×269
cover:   source 285,0 630×630 → canvas 0,0 512×512
contain at 16 px: → canvas 0,4 16×8

The ICO header, byte by byte

The first 54 bytes of a favicon.ico whose three PNGs are 400, 900 and 1500 bytes long. Each entry starts with the width and height (0x10 = 16, 0x20 = 32, 0x30 = 48), then 1 colour plane and 32 bits per pixel, the PNG’s length (0x0190 = 400) and its offset: the first image starts right after the header at 0x36 = 54, the next at 54 + 400 = 454 (0x01c6). The real PNG lengths depend on your icon.

PNG entries
16 × 16 — 400 bytes
32 × 32 — 900 bytes
48 × 48 — 1500 bytes
Header (hex)
00 00 01 00 03 00
10 10 00 00 01 00 20 00 90 01 00 00 36 00 00 00
20 20 00 00 01 00 20 00 84 03 00 00 c6 01 00 00
30 30 00 00 01 00 20 00 dc 05 00 00 4a 05 00 00

Manifest with a blank short name

With the short name left empty the manifest repeats the full name, since Android needs a label under the icon. The two icons are always the 192 and 512 pixel PNGs, at the root of the site.

App details
App name: Example Notes   Short name: (empty)
Theme: #0f766e   Background: #ffffff   Display: standalone
site.webmanifest
{
  "name": "Example Notes",
  "short_name": "Example Notes",
  "theme_color": "#0f766e",
  "background_color": "#ffffff",
  "display": "standalone",
  "icons": [
    {
      "src": "/android-chrome-192x192.png",
      "sizes": "192x192",
      "type": "image/png"
    },
    {
      "src": "/android-chrome-512x512.png",
      "sizes": "512x512",
      "type": "image/png"
    }
  ]
}

Supported formats

  • Reads: PNG, SVG, JPEG and WebPOne image up to 20 MB, dropped, chosen or pasted. A square image of 512 pixels or more gives the sharpest results; SVG has no size to worry about. Or no file at all: one to three characters or an emoji.
  • Writes: favicon.icoThree PNG-compressed images, 16, 32 and 48 pixels, with transparency. Read by every browser and by Windows.
  • Writes: five PNG sizes and an SVGfavicon-16x16.png, favicon-32x32.png, apple-touch-icon.png (180, opaque), android-chrome-192x192.png and android-chrome-512x512.png; favicon.svg when the source is text or an SVG file.
  • Writes: site.webmanifest and HTMLA web app manifest with name, short name, colours, display mode and icons, and the link and meta tags that reference every file. Download each file on its own or all of them in one ZIP.

Use cases

  • A favicon for a new projectA side project, a documentation site or an internal dashboard that still shows the framework’s default icon: a letter or an emoji on a colour is ready in seconds and is easier to spot among twenty tabs.
  • Tell environments apartGive staging a different background colour from production, so the tab you are about to click in is obviously the right one.
  • Make a site installableThe 192 and 512 pixel icons and the manifest are what Chrome and Android look for before offering to install a progressive web app or add it to the home screen.
  • Replace an old favicon.icoTurn the logo you already have into a modern set: one ICO for compatibility, an SVG for sharp tabs on high-density screens and the touch icons phones use.

Limitations

  • Fonts and emoji come from your systemThe text icon uses the fonts installed where it is drawn. The PNGs are drawn on your machine, so they look as they do in the preview, but favicon.svg is drawn by each visitor’s browser with their fonts: an emoji looks like Apple’s on a Mac and like Microsoft’s or Google’s elsewhere, and a letter may shift slightly.
  • Text is centred by the font, not measuredThe text is placed with the font’s own centre line and sized by the number of characters, not by measuring the glyphs, so wide letters such as W can come close to the edge at zero padding, and some fonts sit a little high or low.
  • An SVG source is copied as it isContain and cover shape the PNGs only. favicon.svg is your file unchanged, so a non-square SVG keeps its proportions and browsers fit it into the tab themselves.
  • No dark-mode or maskable variantsThe SVG has no prefers-color-scheme rule, and the manifest icons are not marked purpose "maskable", so Android may shrink them inside a white circle rather than filling its icon shape.
  • Small images are enlargedA bitmap smaller than 512 pixels is scaled up for the larger icons and will look soft; the tool warns when that happens. Paths in the snippet and manifest assume the files sit at the site root.

Frequently asked questions

Which favicon sizes do I actually need in 2026?

Far fewer than the old 20-file packs suggest. Browsers need a favicon.ico (or a 32 × 32 PNG) for the tab, an SVG if you want one icon that stays sharp at every size, a 180 × 180 apple-touch-icon.png for iPhone and iPad home screens, and 192 × 192 and 512 × 512 PNGs listed in a web app manifest for Android and installable web apps. The 16 × 16 PNG is a small extra for older browsers that pick the closest exact size. Windows tile images (browserconfig.xml, mstile-*.png) and the dozen Apple sizes from the iOS 6 era only ever mattered to browsers and devices that are long retired.

Should I use an ICO, PNG or SVG favicon?

Use all three, each for what it is good at. favicon.ico is the file browsers and crawlers request from the site root when a page names no icon, and it can hold several sizes in one file. PNG is what the Apple and Android icons must be. SVG scales to any size and pixel density from one small file and is used by Chrome, Edge and Firefox; browsers that cannot read it, older Safari among them, fall back to the ICO or PNG. Order the link tags as in the snippet this tool writes, so each browser finds the best file it understands.

Why is my new favicon not showing or not updating?

Browsers cache favicons separately from the page and much more stubbornly, often for days, so a new icon can be live and still not appear. Open the icon URL itself (yoursite.com/favicon.ico) and reload it, try a private window, or add a version to the links, such as href="/favicon.ico?v=2", to force a fresh request. If it still fails, check the file is really at the path in the tag, that the server sends it with an image content type rather than an HTML 404 page, and that the tags are inside <head>. Google’s search results use their own crawl of the icon and can take weeks to change.

Where do I put the favicon files?

In the root of the site, next to index.html, so that /favicon.ico and the other paths in the snippet resolve. In most frameworks that is the public or static folder: public/ in Vite, Next.js, Angular and Create React App, static/ in Hugo and SvelteKit. Then paste the HTML snippet into the <head> of every page, or into the shared layout template. favicon.ico in particular should stay at the root even if you link it, because some tools request /favicon.ico without reading the page at all.

Why does my apple-touch-icon have a black background?

iOS does not show transparency on the home screen: it paints transparent pixels black and then rounds the corners itself. That is why this tool always fills apple-touch-icon.png with the background colour from the app details, while the other PNGs keep their transparency. For the same reason, do not round the corners of that icon yourself — iOS masks it, and pre-rounded corners show a ring of background colour inside the mask.

What is site.webmanifest and do I need it?

It is a small JSON file that tells Android, Chrome and Edge what to call your site and which icons to use when someone adds it to the home screen or installs it as an app. Without it, Android falls back to the small favicon or a generic letter icon. The name and short_name are the labels under the icon, theme_color tints the browser bar and the splash screen, background_color fills the splash screen while the page loads, and display decides whether the site opens with browser controls or full screen like an app.

Is my logo uploaded anywhere?

No. The image is opened, resized and encoded into PNG, ICO and SVG files by your own browser, and the ZIP is built in the page as well. Nothing is sent over the network, so you can make icons from an unreleased logo or a client’s brand assets; the network tab stays empty while you work.