Code & Media

Favicon Generator

Generate every favicon size and an ICO container from one source image.

  • Draft kept in this tabYour draft is kept in this tab's session storage and cleared when the tab closes.
  • Runs in your browserProcessing happens in this page. No application server receives your input.
Load sample

Source image

sample-512x512.png (45 B)

Favicon files

Source format
PNG
Source dimensions
512 ร— 512 px
Letterbox mode
Square (1:1 โ€” no letterbox)
Archive entries
4
Archive size
324 B
Generated favicon files
NameResolutionMedia typeSizeSave
favicon.ico16ร—16, 32ร—32, 48ร—48image/x-icon189 B
favicon-16.png16ร—16image/png45 B
favicon-32.png32ร—32image/png45 B
apple-touch-icon.png180ร—180image/png45 B

HTML link tags

184 characters

What this tool does

Renders a single raster or SVG source image into the standard favicon sizes (16ร—16 through 512ร—512), packs a multi-resolution favicon.ico (16ร—16, 32ร—32, 48ร—48), assembles favicons.zip locally, and generates the corresponding HTML <link> tags without uploading any image.

Generation & safety rules

  • PNG or raster image under the size cap: decodes dimensions and emits a ZIP of the requested sizes, favicon.ico, and HTML <link> tags.
  • SVG source: decodes through the sanitized rasterizer without executing active content and produces the same multi-size PNG + ICO archive.
  • Non-square source image: preserves aspect ratio via centered letterbox placement filled with the selected background color rather than stretching.
  • Non-image file: rejects with DecodeFailed before emitting partial output.
  • Oversized source: rejects files above 16.0 MB with InputTooLarge and dimensions above 8,192 pixels on any side with DimensionsTooLarge before canvas allocation.

Operational limits & execution

Maximum source file size: 16.0 MB (InputTooLarge above cap). Maximum source dimension: 8,192 ร— 8,192 px on the longest side (DimensionsTooLarge checked before decode). Decode and canvas draw run locally in-page; ZIP assembly runs in codegen.worker.ts via fflate.

Worked example

Input:

a 512 by 512 PNG, sizes [16, 32, 180]

Expected output:

favicons.zip containing favicon-16.png, favicon-32.png, apple-touch-icon.png
<link rel="icon" sizes="16x16" href="/favicon-16.png">

Scope: this covers the page itself. Your browser, operating system, clipboard, downloads, extensions, and crash recovery may keep copies, and a compromised site origin would not be protected.