.woff2 MIME Type: font/woff2

Files ending in .woff2 (Web font (WOFF2)) use the MIME type font/woff2.

Updated

font/woff2
MIME type for .woff2
Fonts
Category
No
Compress with gzip/Brotli

What is the MIME type of .woff2 files?

The MIME type (media type) for Web font (WOFF2) files with the .woff2 extension is font/woff2. The preferred web font format — Brotli-compressed internally, so do not compress it again. Fonts loaded cross-origin need CORS headers (Access-Control-Allow-Origin).

Content-Type header

Content-Type: font/woff2

Server configuration

ServerConfiguration
Nginx (mime.types or types {})font/woff2 woff2;
Apache (.htaccess)AddType font/woff2 .woff2
IIS (web.config)<mimeMap fileExtension=".woff2" mimeType="font/woff2" />
Node.js / Expressres.type('woff2') or res.setHeader('Content-Type', 'font/woff2')
Amazon S3Set Content-Type: font/woff2 on the object (metadata), or pass --content-type font/woff2 to aws s3 cp

Should .woff2 files be compressed?

No. Web font (WOFF2) files are already compressed internally, so gzip or Brotli would waste CPU and barely reduce — sometimes even increase — the size. Leave font/woff2 out of your compression configuration.

Why the MIME type matters

Browsers decide what to do with a response — render, run, play or download — from the Content-Type header, not the file extension. With X-Content-Type-Options: nosniff, a wrong type causes stylesheets and scripts to be blocked outright. For uploads, never trust the type sent by the client; check the file’s content (its magic bytes) on the server.

MIME type lookupSearch every common file extension and MIME type, with copy-ready Content-Type headers.
Search all MIME types

Frequently asked questions

What is the MIME type for .woff2?
font/woff2.
How do I set the Content-Type for .woff2 in Nginx?
Make sure font/woff2 woff2; is listed in the types block (usually in /etc/nginx/mime.types) and reload Nginx.
Should I gzip .woff2 files?
No — the format is already compressed, so HTTP compression gives no benefit.