Most developers meet the Google favicon API the same way: they need a small site icon next to a link, and someone pastes a Google URL. It works, with no key. But we found no official page for it, and it has a few habits that bite in production. Here is how it works, and how it compares with two other no-key options.
DisclosureWe build LogoAPI.sh, one of the three. It gets the same format and its own cons. Google and DuckDuckGo facts come from plain requests we ran on Nov 2, 2026. Both are third-party services and can change.
Short answer
The Google favicon API is one public URL: https://www.google.com/s2/favicons?domain=stripe.com&sz=64. It returns the site's icon as a PNG, with no key.
Its gaps: no official page that we could find, a 404 status with a small globe image for sites it has no icon for, and PNG only. If you need a documented URL, https://logoapi.sh/icon/{domain} returns an icon for any domain, free for 2M requests a month per site. In our test of 10 small sites, Google returned a real icon for 9, and so did /icon (2 catalog marks, 7 fetched site favicons, 1 name tile).
How the Google favicon URL works
You put the URL in an img tag. Google redirects it (a 301 to a gstatic.com address) and sends back an image. There are two query parameters.
<img src="https://www.google.com/s2/favicons?domain=stripe.com&sz=64"
alt="" width="32" height="32">
domain: the site you want, for examplestripe.com. A full URL such ashttps://stripe.com/pricingalso worked.sz: size in pixels. For stripe.com, 16, 32, 64, 128 and 256 each came back at exactly that size. 512, or noszat all, gave a 16 px icon.- Result: a PNG of the icon the site publishes. It is a raster image, so it can't scale like an SVG.
The redirect is cached for 30 minutes and the image for 7 days. You will also see this called “Google S2 favicons” or the “s2 converter”. Same URL.
Quick comparison
| Service | Key needed | Format | Unknown site | Best for |
|---|---|---|---|---|
| No | ICO | 404 and a grey placeholder | A second no-key source | |
| No | PNG | 404 and a small globe | Real favicons of small sites | |
| LogoAPI.sh | No | SVG, or the site's favicon | Its own favicon, else a name tile | Sharp icons of known brands, documented |
Tip: test with your own domainsCoverage depends on your data. Paste 20 domains from your real list into each URL before you decide.

1. DuckDuckGo
DuckDuckGo serves site icons from its own icon host, with no key. It is the usual second choice when people want to avoid sending requests to Google.
There is no size option: ?size=64 on the same URL returned a 404. DuckDuckGo has a help page about favicons, but it covers the icons in its own search results, not this URL for developers.
https://icons.duckduckgo.com/ip3/stripe.com.ico
Pros
- No key, no account
- The stripe.com file held 48 px and 32 px icons in one ICO
- Requests go to DuckDuckGo, not Google
- Cached for 30 days
Cons
- ICO format, no size option
- A 404 status and a grey placeholder image on a miss
- No developer docs for this URL
- No CORS header, so you can't read it in a canvas or fetch
Pricing: free; we found no published allowance.
Best for: a no-key backup source, or a non-Google default.

2. Google s2 favicons
Google's URL is the most widely used. Because it pulls the icon each site publishes, it can show a real favicon for small and local sites that no curated catalog covers.
The trade-off is that you depend on a URL we found no official page for. It can change without notice, and an unknown site gets a globe image, not a clean error.
https://www.google.com/s2/favicons?domain=stripe.com&sz=64
Watch out: a miss is a 404 with an imageFor an unknown domain, and for a real site with no icon (example.com in our test), Google answered HTTP 404 with a 16 px globe image, even at sz=64. If you fetch it yourself, check the status code.
Pros
- No key, no account
- Real favicons for small sites: 9 of our 10 test sites
- A size parameter, 16 to 256 px
Cons
- No official page that we could find
- PNG only
- A 404 and a globe image on a miss
- No CORS header, so you can't read it in a canvas or fetch
Pricing: free; we found no published allowance.
Best for: real favicons of long-tail sites, when undocumented is acceptable.
3. LogoAPI.sh
LogoAPI.sh is ours. /icon/{domain} returns an icon for any domain. For the 5,031 brands in our catalog it is the brand's mark, square for most sites; a brand that only has a wide wordmark, such as Stripe, gets that instead. For other domains it fetches the site's own favicon, and if there is none it returns a name tile, never a broken image. Free. No key. No signup. No attribution.
The catch: only catalog brands get a curated SVG mark. For other sites you get the site's own favicon, often PNG or ICO and not always sharp, or a name tile. In our 10-site test that was 2 marks, 7 favicons and 1 tile.
https://logoapi.sh/icon/stripe.com
Two other routes, for other jobs: https://logoapi.sh/{domain} returns the full logo, and https://logoapi.sh/favicon/{domain} returns catalog icons only, with a 404 for the rest. See the Favicon API page to try any domain.
Pros
- Documented, with a stated allowance and terms
- SVG for catalog brands, sharp at any size
- Never a broken image; open CORS
- No key, no signup, no attribution; commercial use included
Cons
- 5,031 curated brands; other sites get their own favicon (not always SVG) or a name tile
- A brand with only a wide wordmark is not square
- A young service next to Google
Pricing: free up to 2M requests a month per site; Pro $29 a month for up to 10M. Source
Best for: sharp icons of well-known brands, from a documented URL.
Switch in one line
Moving off Google is one src change. No key, nothing to install.
<!-- before -->
<img src="https://www.google.com/s2/favicons?domain=stripe.com&sz=64">
<!-- after -->
<img src="https://logoapi.sh/icon/stripe.com" alt="" width="32" height="32">
Tip: keep Google for the long tailWant our SVG when we have it, and Google's real favicon when we don't? Use /favicon/{domain} and fall back in onerror. It returns a 404 with a JSON body on a miss, so the img fails and onerror runs.
<img src="https://logoapi.sh/favicon/stripe.com" alt="" width="16" height="16"
onerror="this.onerror=null;this.src='https://www.google.com/s2/favicons?domain=stripe.com&sz=32'">
How to choose
- Coverage. Lots of small or local sites? Google and
/iconeach returned a real icon for 9 of our 10 small sites. Test yours. - Format. Need SVG or sharp icons at large sizes for well-known brands? LogoAPI.sh.
- Docs and terms. Need a stated allowance for a product? Only LogoAPI.sh publishes one.
- Misses. Want a clean error to handle?
/favicon/{domain}gives a 404 with no image. Google and DuckDuckGo give a 404 with a placeholder image. - Privacy. Each choice sends your visitors' requests to that company. Pick the one you trust.
Bottom line
There is no single right favicon URL. Google is the widest and shows real icons for small sites, but we found no official page for it. DuckDuckGo is a similar no-key option off Google. LogoAPI.sh is documented and sharp, but curates far fewer brands. Mixing them, as in the snippet above, is often the best answer.
Google and DuckDuckGo facts from plain requests on Nov 2, 2026. Both are third-party services and can change.
Our take
We build LogoAPI.sh, so weigh this: we win when you want a sharp icon for well-known brands, from a URL with docs and a stated free allowance.
Outside our catalog, we are no sharper than Google: you get the site's own favicon, as Google would.
Our 5,031 brands are a fraction of the web. In our 10-site test, 2 sites were in the catalog, 7 more got their own favicon, and 1 got a name tile. Google returned an icon for 9. So on coverage it was a tie; our edge is the curated SVG for catalog brands, and a documented URL.
Questions developers ask
What is the Google favicon API?
A public Google URL that returns a site's favicon as a PNG: https://www.google.com/s2/favicons?domain=stripe.com&sz=64. It needs no key. We found no official Google page for it.
Is there a free alternative?
Yes. DuckDuckGo has a no-key icon URL. https://logoapi.sh/icon/{domain} returns an SVG icon for any domain: the brand's mark for catalog brands, the site's own favicon or a name tile for the rest. 2M requests a month per site. Free.
Why does Google show a globe?
Google has no icon for that domain, so it answers HTTP 404 with a 16 px globe image. Check the status code if you fetch it in code.
Why do I get a tiny icon at sz=512?
In our test, sizes up to 256 came back at that size for stripe.com. 512 returned a 16 px icon, the same as no sz. Stay at 256 or below. An SVG needs no size parameter, so /icon/{domain} stays sharp at any size. Set width and height on the img.
Icon, logo or favicon: which LogoAPI.sh URL?
Tabs, lists and small UI: /icon/{domain}. A full logo: /{domain}. Catalog icons only, with your own fallback on the 404: /favicon/{domain}.
Is the icon always square?
For most brands, yes. A brand that only has a wide wordmark gets that wordmark, and the name tile is wide too. Set both width and height, or use object-fit:contain, so a wide one never stretches.
My site's icon is missing or old.
Claim your brand on LogoAPI.sh and send the right file. For Google, update the favicon on your own site and wait for it to refresh.