Retrieves the relevant favicon for a URL, or returns a default icon should it not be able to find it. Works better than the Google version as it will find favicons specified by an HTML page's <link> element. Feel free to hotlink, although it would be nice if you could email me if you're going to make more than a couple of requests a second.

getFavicon's source is available at


To retrieve a favicon you can hotlink it at...[URL]

Notice the URL contains the protocol (http or https). For example...

This works well in an <img> tag...

<img src="" alt="Google" width="16" height="16" />


Of course, you'll need to escape the URL you want the favicon for. E.g...

Default icon

You can specify a default icon to be displayed should the favicon not be found...

You can also pass the following defaulticon values for other responses when a favicon isn't found:


You can request an HTTPS version like this...

Or get the secure icon for a domain like this...

Multiple domains

To improve the performance of pages with many favicons on them you can overcome browser connection limits by pointing to the icon on different domains. You can see this in action on the test page (source) where we use the first letter of the domain to generate a subdomain name. The domains are of the format...



You can remove an icon from the cache by calling /decache/?domain=[domain]. E.g. /decache/?domain=


More examples

1000 more examples on the test page.

Last cached icons


Updated every minute or so

Icons served
12223.0 million
Icons cached
93.68 million
Cache hit rate
Unable to find favicon


Known problems


By Jason from Potato

Built using