Media type · font/woff2

font/woff2

font/woff2 is the media type for WOFF2 web fonts.

Key facts

Typefont/woff2
Extensions.woff2
StandardW3C WOFF2
Text or binaryBinary
Typical use@font-face in CSS

What font/woff2 is

WOFF2 is a compressed web-font container with better compression than WOFF. It wraps the same font data with a header that lets browsers decompress it efficiently. It is the default choice for web fonts; WOFF and raw TTF/OTF remain as fallbacks for older clients.

Loading and CORS

A font loaded with @font-face is a cross-origin request when it is served from another domain. Browsers require an Access-Control-Allow-Origin header on the font response, even with crossorigin set on the request. A missing CORS header makes the font fail silently and the fallback font appear. Also declare the right type: a WOFF2 served as font/woff may be rejected.

Frequently asked questions

Why is my web font not loading?

Check CORS first: a cross-origin font needs Access-Control-Allow-Origin. Then check the media type and that the file is actually WOFF2.

Should I serve TTF instead of WOFF2?

No. WOFF2 is smaller and decompresses natively in modern browsers. Keep TTF only as a fallback for legacy clients.

New tools, straight to your inbox

One short email when we add tools worth using. No spam, unsubscribe anytime.