CSS Font Fallback Generator

Generate a complete cross-platform font-family fallback stack for your primary font. Every stack ends with the correct generic family so text always renders — even if your custom font fails.

What goes into a good fallback stack

  1. Your custom font — the family declared in your @font-face.
  2. Platform system fonts — fallbacks that ship with each OS (Apple system, Segoe UI, Roboto).
  3. Generic family — serif, sans-serif, or monospace. This is required by CSS spec.
Preventing layout shift: If your fallback font has very different metrics (x-height, character widths) than your primary, users will see text reflow when the font loads. Combine this tool with size-adjust and ascent-override in a separate @font-face rule that names the fallback and adjusts its metrics to match your primary font.

Frequently asked questions

What is a font-family fallback stack?

A comma-separated list of fonts ending with a generic family. The browser tries each in order until it finds one that renders the requested character. Always end with a generic family.

Why do I need a system fallback?

If your custom font fails to load (network error, missing file, unsupported format), the browser moves to the next family. Without a robust chain, text may render in an unpredictable default that breaks your layout.

Should I include both -apple-system and Segoe UI?

Yes. Each covers a different platform — -apple-system for macOS/iOS, Segoe UI for Windows. Including both ensures the correct native system font is used on each platform.

Do I need BlinkMacSystemFont?

Only for Chrome on older macOS versions. It has been deprecated in modern Chrome but remains harmless to include.

Related tools