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
cURL
curl -L https://favicon.toolhub.sbs/github.com -o favicon.pngParameters
| Parameter | Type | Description |
|---|---|---|
| larger | boolean | Set to true to get a larger icon (up to 256px) |
| default-avatar | URL (encoded) | Custom fallback URL when no favicon is found |
| throw-error-on-404 | boolean | Return HTTP 404 when no icon found (useful for onerror handling) |
Examples
Default favicon (32px)
https://favicon.toolhub.sbs/github.comLarge favicon (up to 256px)
https://favicon.toolhub.sbs/github.com?larger=trueCustom fallback image
https://favicon.toolhub.sbs/example.com?default-avatar=https%3A%2F%2Fmysite.com%2Fdefault.pngError on not found
https://favicon.toolhub.sbs/example.com?throw-error-on-404=trueResponse
| Status | Description |
|---|---|
| 302 | Redirect to the favicon image (CDN cached) |
| 400 | Invalid domain parameter |
| 404 | No 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.sbsto 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).