Skip to main content
Any app that lists companies needs their logos: CRM rows, vendor dashboards, customer directories. One logo is one URL; showing hundreds reliably means surviving dark surfaces, retina screens, and companies with no logo at all. A user opens the list and every row carries a crisp mark, matched to the surface, with an initials avatar where no logo exists. Each one starts as a single Logo API image URL:

Demo

Switch to the dark surface and watch GitHub’s black mark invert, then try a made-up domain to see the fallback: Every logo loads live from img.logo.dev as you toggle. The made-up domain shows the initials avatar instead of a broken image.

Build it with AI

Want the right logo for every company in your app? This prompt gives your AI coding tool everything it needs to build it in your framework.

Open in Cursor

Code

This example is in React, but you can get the same result in any frontend framework: the logo is one image URL, and dark mode rides on a standard <picture> element. Paste CompanyLogo.tsx, then render it as the Usage tab shows.
Your publishable key is built for client-side code, so you can ship it in the browser as-is.

How it works

  • One image URL returns the logo. img.logo.dev/:domain serves the company’s mark, and parameters do the tuning: size for dimensions, retina=true for sharp rendering, format=webp for weight. See all image parameters.
  • fallback=404 puts misses in your hands. Unknown domains return a generated monogram by default; adding fallback=404 turns a miss into an image error the component catches with its own avatar. See fallback images.
  • theme=dark keeps dark marks legible. It inverts predominantly dark logos like GitHub’s for dark backgrounds, and most colored logos return the same file for both themes.
  • The browser does the switching. The component pairs a light URL with a dark URL, and the user’s color scheme picks between them, even when it changes live.

Make it your own

  • Mute a long list. Add &greyscale=true for uniform, low-contrast logo grids. See all image parameters.
  • Keep the monogram. Drop fallback=404 and the error path when Logo.dev’s generated lettermark is enough; the URL then always returns an image. See fallback images.
  • Start from names instead. Use the logo from a name pattern when your data has company names without domains.

Next steps

Logo API

Look up every parameter the domain endpoint accepts: size, format, theme, greyscale, and fallbacks.

Logo from a name

Render logos from company names when your lists have no domains.