Loading Base64 to Image Converter...
How to Convert Base64 to an ICO Favicon
Favicons often end up as Base64 text: inlined in an HTML head as a data: URI, stored next to a site record in a database, or returned by an API that scrapes icons from other sites. This page turns that text back into a real favicon.ico you can open, inspect or drop into a project.
Paste the Base64 favicon
Paste the string into the input panel, for example one copied from a data: URI in an HTML head, a manifest or a JSON response. The data:image/x-icon;base64, prefix and line breaks can stay. You can also upload a .txt file that holds the string.
AAABAA and a cursor with AAACAA.data:image/x-icon;base64, or data:image/vnd.microsoft.icon;base64, in front of the string is stripped for you.Check the format and the preview
A moment after you paste, the string is decoded and the Format line shows what the header says the file is: ICO, CUR, or another image type if the string was not an icon after all. The preview shows the size the browser chose to draw.
What is inside an ICO file
A 6-byte header with the type (1 for icons, 2 for cursors) and the number of images, then a 16-byte directory entry for each image giving its width, height and where its data starts. Each image is stored either as a small bitmap with a transparency mask or as a complete PNG, which is common for the 256 pixel size. The ICO file format article covers the details, and Base64 itself is defined in RFC 4648.
Download the icon
Click Download to save the decoded bytes. An icon is saved as .ico and a cursor as .cur; anything else keeps the extension of its real format. On larger screens you can type a file name first.
favicon.ico, or reference it with <link rel="icon" href="/favicon.ico">.Frequently Asked Questions
How do I know a Base64 string is an ICO file?
Every ICO file opens with the bytes 00 00 01 00, and in Base64 those always come out as AAABAA at the start of the string. A cursor file opens with 00 00 02 00, which shows up as AAACAA. You do not have to check by eye, though: the page reads the decoded header and shows the format it found.
My favicon.ico holds 16, 32 and 48 pixel icons. Are they all kept?
Yes. Decoding Base64 gives back the exact bytes that were encoded, so the downloaded .ico still has every size in it, along with each one’s colour depth and transparency. The preview only shows one picture, because the browser picks a single size to draw (Chrome draws the largest), but the others are still in the file.
Can I decode a cursor (.cur) file here?
Yes. Windows cursors use the same layout as icons plus a hotspot, the point of the arrow that does the clicking. The page labels them CUR and saves them with a .cur extension, unchanged. Chrome usually draws the cursor image in the preview as well.
What happens if I paste a PNG instead of an icon?
It is labelled PNG and downloads as a .png file. This page decodes Base64, it does not convert between image formats, so a PNG does not become an ICO here. Modern browsers accept a PNG favicon through a link tag anyway; if you really need an .ico, an icon editor or ImageMagick can build one from your PNG.
Which data URI prefixes work?
Both names for the icon type are fine: data:image/x-icon;base64, and data:image/vnd.microsoft.icon;base64,. The prefix is removed before decoding, and so are line breaks and spaces. URL-safe Base64 with - and _ is accepted too.
How do I use the decoded file as my site favicon?
Save it as favicon.ico in the root folder of your site. Most browsers request /favicon.ico on their own, and you can also point to it from the page head with a link tag whose rel is icon and whose href is /favicon.ico.
Does my Base64 get uploaded?
No. JavaScript in your own browser decodes the string, draws the preview and builds the download. Nothing is sent to our server and nothing is kept, so the editor is empty again after a reload.
Related pages: Image to Base64 · Base64 to PNG · Base64 to Image
Related Tools
Image to Base64
Convert images to Base64 encoded strings for embedding in HTML, CSS, and APIs
Base64 to Image
Decode Base64 encoded strings to view and download images (PNG, JPG, GIF, SVG)
PNG to Base64
Convert PNG images to Base64 encoded strings for embedding
Base64 to PNG
Decode Base64 strings to PNG images, see the picture and save the exact file
BMP to Base64
Convert BMP/Bitmap images to Base64 encoded strings
Base64 to BMP
Decode Base64 strings to BMP/Bitmap images