Inside a .ico: a 6-byte header and one record per size
An ICO file is not an image format so much as a tiny archive with an image format inside it. The file opens with a six byte header holding a reserved zero, a type field set to 1 for icons, and a count of how many images follow. After that comes one sixteen byte directory record per image, and after all the records, the image payloads laid end to end.
Each record carries the entry’s width and height, a palette count, a colour planes field, a bit depth, and then the two numbers that actually matter: how many bytes this image occupies and how far into the file it starts. A program reading the icon parses the directory, decides which size it wants, seeks to that offset and reads that many bytes. It never touches the others.
The payloads this tool writes are ordinary PNG files, stored verbatim. That has been legal since Windows Vista and is what every modern browser expects from a favicon, and it is why alpha transparency survives the conversion intact while the bit depth field declares 32 bits per pixel.
Contain-fit padding, not a centre crop
Your PNG is decoded once into a bitmap, and every requested size is drawn from that same bitmap rather than from the previously rendered size, so a 16 px entry is not a downscale of a downscale.
The placement rule is contain-fit. The scale factor is the target size divided by the source’s longest edge, so the whole image always fits, and the result is centred on the square canvas with transparent padding filling whatever is left over. A square source, which is the normal case for a logo, fills the canvas exactly and no padding appears at all.
This is a real difference from the sibling tool on this site. Favicon Generator centre-crops a non-square source, trimming the longer edge so the artwork fills the frame. This page pads instead. Neither is universally right: cropping suits a photo or a dense mark, padding suits a logo you do not want cut into. Knowing which one you are using is the part that saves you a surprise.
Rendering goes through an OffscreenCanvas where the browser supports one, and falls back to a regular canvas element otherwise, with image smoothing set to high in both paths.
Packing your sizes into one .ico
- Drop your PNG into the box above, or click Choose a file. This page takes
.pngand nothing else, so a JPG needs converting first. - Choose your Icon sizes. Standard favicon (16, 32, 48 px) is the default and suits almost every website.
- Click Convert PNG to ICO. Each size is rendered in turn and the container is assembled last.
- Download the file and upload it to the root of your site as
favicon.ico.
The 256 px entry and the byte that means 256
The Extended (16–256 px, incl. Windows tiles) preset adds 64 and 256 px entries to the standard three. Two hundred and fifty six is the format’s hard ceiling, and the reason is a design decision from 1985 that never got revised: the width and height in a directory record are each a single byte, which tops out at 255. Rather than widen the field, the specification declares that a stored value of zero means 256.
The writer here handles that quirk directly, and it also filters the requested list, keeping only whole numbers from 1 to 256, removing duplicates and sorting ascending. If a selection somehow leaves nothing valid, it falls back to 16, 32 and 48 rather than producing an empty container.
Pick Extended when the icon will show up in large desktop icon views or on a pinned Windows tile. Otherwise the extra entries are bytes that most visitors download and never use, since a browser tab has no interest in a 256 px icon.
Desktop shortcuts, pinned sites and the automatic /favicon.ico request
Browsers still request /favicon.ico on their own when a page declares no icon, and crawlers and feed readers do the same, which is why a missing one shows up as a 404 in server logs and a blank placeholder next to your site’s name. That request alone justifies shipping the file even on a site that also links modern PNG or SVG icons.
Away from the browser, .ico is simply what Windows uses. A desktop shortcut, a pinned taskbar item and a folder customisation all point at an icon resource, and none of them will accept a PNG. Design tools are no help here either: Figma, Photoshop and Illustrator all export PNG and SVG and none of them writes a multi-size .ico, which is the gap this converter fills.
If you need the full modern set rather than this one file, the Favicon Generator produces the manifest, the Apple touch icon and the standalone PNGs alongside it. Starting from vector artwork? SVG to PNG rasterises it first. More converters are on the image tools hub and in the image converter and editing guide.

