How to use
- Paste the Base64 string or data URI of an icon or of the image you want to turn into one.
- Check the preview and dimensions. A square source image gives the cleanest icon.
- ICO is preselected. Pick one size (16, 32, 48, 64, 128 or 256 pixels) or the multi-size icon.
- Download the .ico file. If the input is already an ICO and you want every image in it unchanged, choose Original.
ICO files in Base64
An ICO file is a small container: a header, a directory of entries and one image per entry, each stored as BMP or PNG data. The header begins with the bytes 00 00 01 00, so the Base64 of an icon starts with AAABAA. You will see Base64 icons in favicon data URIs such as <link rel="icon" href="data:image/x-icon;base64,...">, in single-file HTML pages and in APIs that return website icons.
The registered MIME type is image/vnd.microsoft.icon, but image/x-icon is far more common and works everywhere.
Which icon size to choose
| Size | Typical use |
|---|---|
| 16 × 16 | Browser tab and bookmark on standard screens |
| 32 × 32 | Browser tab on high-density screens |
| 48 × 48 | Windows desktop and Explorer icons |
| 64, 128 | Larger previews and application lists |
| 256 × 256 | Large and extra large icon views on Windows |
The multi-size option packs 16, 32, 48 and 256 into one file, so each system can pick the best match. The images inside are PNG-compressed, which keeps transparency and is supported by Windows Vista and later and by all modern browsers.
Using the icon as a favicon
Browsers request /favicon.ico from the site root automatically, so saving the file there works even without any markup. A Base64 data URI in the href saves that request, but the icon is then downloaded again with every page instead of being cached on its own. Modern browsers also accept PNG and SVG icons, and a common setup combines both:
<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="icon" href="/icon.svg" type="image/svg+xml">
Start from a square image with simple shapes and strong contrast; fine detail disappears at 16 pixels. To get a PNG version for other uses, try Base64 to PNG.
Frequently asked questions
What size should favicon.ico be?
A multi-size icon containing 16, 32 and 48 pixel images covers browsers and Windows. The multi-size option here also adds 256 for large icon views.
Can I convert a Base64 PNG or SVG to ICO?
Yes. Paste it, leave the download format on ICO and choose a size. Any image your browser can display can be converted.
Why does the preview show only one size of my icon?
An ICO file can hold several images, but a preview shows just one of them. Download as Original to keep every image in the file.
Does the ICO keep transparency?
Yes. The icons are stored as PNG data with a full alpha channel, so rounded corners and soft edges stay transparent.
How do I put an icon into a data URI?
href of your <link rel="icon"> tag.