MIME Types

font/woff2

The MIME type for WOFF2 (Web Open Font Format 2) compressed web fonts.

What Is This?

The font/woff2 MIME type indicates that the content is a WOFF2 (Web Open Font Format 2) font file. WOFF2 is the most modern and efficient web font format, offering 30-50% better compression than WOFF. It is the recommended format for serving custom fonts on the web.

Common Uses

1

Common Use

Custom web fonts loaded via @font-face CSS rules

2

Common Use

Icon font libraries (Font Awesome, Material Icons)

3

Common Use

Variable font files

4

Common Use

Typography optimization for web performance

Examples

Server Configuration

Serve files with the font/woff2 MIME type:

# Nginx
location ~ \.woff2$ {
  add_header Content-Type "font/woff2";
}

# Apache
AddType font/woff2 .woff2
HTML Usage

Use this MIME type in HTML or HTTP:

Content-Type: font/woff2

<!-- HTML reference -->
<link rel="preload" href="file.woff2" as="fetch" crossorigin>

Frequently Asked Questions

Should I use WOFF2 or WOFF?

Always use WOFF2 for browsers that support it and provide WOFF as a fallback. WOFF2 offers significantly better compression, reducing font file sizes and improving page load times.

Do I need CORS headers for web fonts?

Yes. Web fonts served from a different domain require Access-Control-Allow-Origin: * (or your domain) CORS headers. Without CORS, browsers block font loading for cross-origin @font-face declarations.