Favicon Hub logoFavicon Hub

Favicon API

Free, fast, and simple. No registration or API key required.

Base URL

https://favicon.toolhub.sbs/{domain}

Basic Usage

Simply pass any domain as the path parameter to get its favicon:

HTML

<img src="https://favicon.toolhub.sbs/github.com" alt="GitHub favicon" loading="lazy" />

Markdown

![GitHub](https://favicon.toolhub.sbs/github.com)

cURL

curl -L https://favicon.toolhub.sbs/github.com -o favicon.png

Parameters

ParameterTypeDescription
largerbooleanSet to true to get a larger icon (up to 256px)
default-avatarURL (encoded)Custom fallback URL when no favicon is found
throw-error-on-404booleanReturn HTTP 404 when no icon found (useful for onerror handling)

Examples

Default favicon (32px)

https://favicon.toolhub.sbs/github.com

Large favicon (up to 256px)

https://favicon.toolhub.sbs/github.com?larger=true

Custom fallback image

https://favicon.toolhub.sbs/example.com?default-avatar=https%3A%2F%2Fmysite.com%2Fdefault.png

Error on not found

https://favicon.toolhub.sbs/example.com?throw-error-on-404=true

Response

StatusDescription
302Redirect to the favicon image (CDN cached)
400Invalid domain parameter
404No favicon found (only with throw-error-on-404=true)

Tips

  • • Reference our URL directly in your pages - no need to download and host icons yourself.
  • • Always use loading="lazy" to avoid loading too many icons at once.
  • • For Next.js projects, add favicon.toolhub.sbs to your image domains configuration.
  • • Icons are served via global CDN with long cache headers for maximum performance.
  • • Subdomains are supported (e.g., play.google.com).