.woff MIME type
WOFF fontfonts
font/woffThe original web font format, zlib-compressed. Superseded by WOFF2.
| MIME type | font/woff |
|---|---|
| Extensions | .woff |
| Content-Type | font/woff |
| Compress in transit? | No — already compressed |
| File signature | 77 4F 46 46 (wOFF) |
Good to know
- Only needed as a fallback for very old browsers; WOFF2 is smaller.
Serve .woff files with the right type
The response header to send:
Content-Type: font/woff
Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:
nginx (inside the types block in mime.types)
font/woff woff;
Apache (.htaccess or server config)
AddType font/woff .woff
Express
res.set("Content-Type", "font/woff");Python
import mimetypes
mimetypes.add_type("font/woff", ".woff")HTML file input
<input type="file" accept=".woff,font/woff">
Check it
See what a server sends for a file, and what type a local file really is by its contents:
curl -sI https://example.com/file.woff | grep -i '^content-type:' file --mime-type file.woff
Frequently asked questions
What is the MIME type for .woff files?
font/woff.
What Content-Type header should a .woff file be served with?
Content-Type: font/woff. It's already compressed, so servers shouldn't gzip it.
How can I tell if a file is really a .woff?
Check its bytes rather than the extension: WOFF files start with 77 4F 46 46 (wOFF). On the command line, file --mime-type name.woff does this for you.
Related types
Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options