PNG to ICO Converter (Favicon Maker)
Turn a PNG, JPG, WebP or SVG into a .ico file with several sizes inside, ready to use as a favicon or a Windows icon.
Results
What this tool does
A .ico file is not one picture but a small folder of them: the browser tab uses the 16 px version, the taskbar and bookmarks the 32 and 48 px ones, and Windows reaches for 256 px on the desktop. This converter draws one square image per size from your file and packs them as PNG inside a single icon, which every browser and every Windows version since Vista reads. Start from a square image at least as large as the biggest size you want; a wider picture is centred with transparent bands rather than squashed. For a website, put favicon.ico at the root of the domain and most browsers will find it without any extra tag.
Formula
file = 6-byte header + 16 bytes per size + one square PNG per size
Variables
| Symbol | Meaning | Unit |
|---|---|---|
sizes | Sizes to put in the icon | — |
source_w | Original width | — |
source_h | Original height | — |
bytes_out | New size, in bytes | — |
OUT | Sizes inside the .ico | — |
CN | Images in the file | — |
SZ | New file size | — |
HD | Header and directory | B |
UP | Enlarged beyond the original | — |
SQ | Original is square | — |
Worked example
- Sizes to put in the icon16,32,48
- Original width512
- Original height512
- New size, in bytes4302
- Sizes inside the .ico16, 32, 48 px
- Images in the file3
- New file size4.2 kB
- Header and directory54 B
- Enlarged beyond the originalNo
- Original is squareYes
Limitations
- The calculation runs entirely in your browser. The values you type are never sent to a server.