🖼️ Image to ICO (Favicon) Converter
By ToolNimba Web Dev Team · Updated 2026-06-19
A square image of at least 48 x 48 px works best. PNG, JPG, WEBP, GIF, BMP or SVG. Files stay on your device, nothing is uploaded.
Download your icons
The .ico file holds a single 32 x 32 icon. The PNG files at 16, 32 and 48 px also work as favicons in every modern browser, just reference them with a link tag.
Choose an image to begin. All processing happens locally in your browser.
This tool turns an ordinary image into icon files you can use as a website favicon. Upload a PNG, JPG, WebP, GIF, BMP or SVG, choose whether to crop it to a centred square, and the tool draws it onto a canvas at the common icon sizes. You get a ready-to-use 32 by 32 pixel .ico file plus separate PNG icons at 16, 32 and 48 pixels. Everything runs locally in your browser, so the image never leaves your device.
What is the Image to ICO Converter?
A favicon is the tiny icon a browser shows in the tab, the bookmark list and the history. For years the only accepted format was .ico, a Windows icon container that can hold one or more images at different sizes inside a single file. The .ico file starts with a small header (the ICONDIR) that records how many images are inside, followed by one directory entry per image giving its width, height, colour depth and where the pixel data sits. Originally that pixel data was an uncompressed bitmap, which is why true multi-size icon packing is fiddly to build by hand.
The modern shortcut is that the ICO format also allows each image to be stored as a PNG. Windows Vista and later, and every current browser, read a PNG embedded inside an .ico without complaint. That is exactly how this tool builds your .ico: it renders your image to a 32 by 32 canvas, exports that as a PNG, then wraps the PNG bytes in the small ICO header so the result is a genuine, valid .ico file rather than a renamed PNG.
There is also a simpler route that many sites now take. Because browsers accept PNG favicons directly through a link tag, you often do not need an .ico file at all. That is why this tool also gives you plain PNG icons at 16, 32 and 48 pixels. You can reference those with a link rel icon tag, or keep the .ico for the classic favicon.ico path that browsers still request automatically. Both approaches are valid, and which you choose comes down to how much legacy support you want.
When to use it
- Creating a favicon.ico for a website, blog or web app from a logo or square image.
- Producing PNG icons at 16, 32 and 48 px to reference with a link rel icon tag.
- Converting a high-resolution logo down to crisp small icons without opening a design app.
- Generating an icon for a browser extension, desktop shortcut or internal tool quickly and privately.
How to use the Image to ICO Converter
- Choose a source image (a square logo of at least 48 by 48 px gives the cleanest result).
- Decide whether to crop to a centred square and pick a background fill for any transparent areas.
- Click Generate ICO and PNGs to render the icon at each size.
- Download the 32 by 32 .ico file and the 16, 32 and 48 px PNGs you need.
Formula & method
Worked examples
You have a 512 by 512 px square PNG logo and want a favicon.ico.
- Upload the 512 x 512 PNG. The tool reports it is square, so cropping is not needed.
- Leave Crop to a centred square on and keep transparency.
- Click Generate. The image is drawn onto a 32 x 32 canvas and exported as a PNG.
- The 32 px PNG bytes are wrapped in a 22-byte ICO header (6 + 16) to form a valid .ico.
Result: A favicon.ico holding one 32 x 32 icon, plus 16, 32 and 48 px PNG files.
You have a 1200 by 800 px non-square JPG photo for an app icon.
- Upload the 1200 x 800 JPG. The tool notes it is not square and suggests cropping.
- Keep Crop to a centred square on, which takes the largest 800 x 800 area from the middle.
- Pick White as the background since JPG has no transparency to preserve.
- Click Generate to scale the cropped square down to each icon size.
Result: A square .ico and PNG icons with the centre of the photo, no stretching or distortion.
Common favicon sizes and where each one is used
| Size | Format here | Typical use |
|---|---|---|
| 16 x 16 px | PNG | Browser tab and address bar at standard zoom |
| 32 x 32 px | PNG and ICO | Browser tab on high-DPI screens, taskbar |
| 48 x 48 px | PNG | Windows site icons and some bookmark views |
| favicon.ico | ICO (32 x 32) | The default file browsers request from the site root |
Structure of the single-image .ico file this tool builds
| Bytes | Field | Value used |
|---|---|---|
| 0 to 5 | ICONDIR header | reserved 0, type 1, count 1 |
| 6 to 21 | ICONDIRENTRY | width 32, height 32, 32 bits per pixel |
| 14 to 17 | Data size | length of the PNG in bytes |
| 18 to 21 | Data offset | 22 (header is 6 + 16 bytes) |
| 22 onward | Image data | the full PNG produced from the canvas |
Common mistakes to avoid
- Uploading a wide rectangular image and expecting a clean icon. Icons are square. If your image is not square, leave Crop to a centred square on so the tool takes the middle square. Turning cropping off instead letterboxes the image, leaving empty bands at the sides.
- Starting from a tiny image and scaling up. Enlarging a 16 px image to 48 px only makes it blurry, because there is no extra detail to recover. Always start from the largest clean version of your logo and let the tool scale it down.
- Flattening transparency by accident. If you pick White or Black as the background, transparent areas are filled with that colour. Keep transparent if you want the icon to blend into any tab or theme colour.
- Assuming you must have an .ico file. Every current browser accepts PNG favicons through a link rel icon tag. The .ico here is for the legacy favicon.ico path and older clients, but PNG icons alone are fine for most modern sites.
Glossary
- Favicon
- The small icon a browser shows in the tab, bookmarks and history for a website.
- ICO
- A Windows icon container format that can hold one or more images at different sizes inside a single file.
- ICONDIR
- The 6-byte header at the start of an .ico file recording the file type and how many images it contains.
- ICONDIRENTRY
- A 16-byte record describing one image inside an .ico: its size, colour depth and where its data is stored.
- PNG-in-ICO
- The accepted practice of storing a PNG-compressed image inside an .ico entry instead of a raw bitmap.
- canvas.toBlob
- A browser method that encodes the current canvas pixels into an image file such as a PNG, returned as a Blob.
Frequently asked questions
How do I convert an image to ICO?
Upload your PNG, JPG, WebP, GIF, BMP or SVG, choose whether to crop it to a square, then click Generate ICO and PNGs. The tool draws your image onto a 32 by 32 canvas and packages it as a real .ico file you can download, all inside your browser.
Can I convert a PNG to ICO without uploading it anywhere?
Yes. This tool runs entirely in your browser using the FileReader and canvas features. Your image is read and processed on your own device and is never sent to any server, so it stays completely private.
Is the .ico file a real icon file or just a renamed PNG?
It is a real .ico file. The tool builds a proper ICONDIR header and ICONDIRENTRY, then stores the PNG image data inside, which is a format the ICO specification allows and that browsers and Windows read correctly.
Why does the tool also give me PNG files?
Modern browsers accept PNG favicons directly through a link rel icon tag, so you often do not need an .ico at all. The 16, 32 and 48 px PNGs let you use that simpler approach, while the .ico covers the classic favicon.ico path.
What size should my source image be?
A square image of at least 48 by 48 px works well, and a larger square logo (256 px or more) is even better. The tool scales down cleanly, but it cannot add detail when scaling a small image up, so start from the largest version you have.
Does the ICO file contain multiple sizes?
The .ico here holds a single 32 by 32 image, which is enough for a working favicon. For multiple sizes in one file you would download the separate PNG icons and reference each with its own link tag, which most modern sites do anyway.