The MIME type for a WOFF2 font is font/woff2, for WOFF it is font/woff, for a TrueType .ttf file font/ttf and for an OpenType .otf file font/otf. All four sit under the font top-level type that RFC 8081 created in February 2017, which replaced older names such as application/font-woff. Every entry below was checked on 23 November 2026 against the IANA font and application registries, RFC 8081, MDN and the default MIME files shipped with nginx and Apache.
Font MIME types by file ending
| File | Ending | MIME type | Signature at the start of the file |
|---|---|---|---|
| WOFF 2.0 web font | .woff2 | font/woff2 | wOF2 (0x774F4632) |
| WOFF 1.0 web font | .woff | font/woff | wOFF (0x774F4646) |
| TrueType font | .ttf | font/ttf | 0x00010000 |
| OpenType font | .otf | font/otf | OTTO for CFF outlines, 0x00010000 for TrueType outlines |
| Font collection (several fonts in one file) | .ttc | font/collection | As for TrueType or OpenType |
| Generic SFNT font | none set | font/sfnt | As for TrueType or OpenType |
| Embedded OpenType (old Internet Explorer format) | .eot | application/vnd.ms-fontobject | Not covered by RFC 8081 |
The IANA font registry holds exactly six entries: collection, otf, sfnt, ttf, woff and woff2, all with RFC 8081 as the reference. EOT never moved to the font tree; it is registered as application/vnd.ms-fontobject in the application registry. RFC 8081 adds that a .ttf ending is normally used only for fonts with TrueType outlines, while .otf can hold any OpenType font, so the ending alone does not tell you which outlines a file contains.
Old font MIME types to replace
| Old name | Status | Use instead |
|---|---|---|
| application/font-woff | Marked DEPRECATED in the IANA registry | font/woff |
| application/font-sfnt | Marked DEPRECATED in the IANA registry | font/sfnt, or font/ttf and font/otf for single files |
| application/x-font-ttf | Never registered; RFC 8081 names it as a common unregistered type | font/ttf |
| font/truetype | Never registered; RFC 8081 calls it nonexistent but intuitive | font/ttf |
| application/octet-stream | Generic type for unknown binary data | The specific font type above |
RFC 8081 says software that meets a font subtype it does not recognise should treat it as application/octet-stream, so a typo such as font/wof2 is no better than sending no font type at all. Browsers load fonts through CSS regardless of these labels in most cases, but tools that compress, cache or check files often decide what to do from the content type.
How web servers label fonts by default
| Server | What its default MIME file maps | What happens to other font files |
|---|---|---|
| nginx (conf/mime.types) | woff, woff2 and eot only | .ttf and .otf get the default_type, which the shipped nginx.conf sets to application/octet-stream (the directive itself defaults to text/plain) |
| Apache httpd (docs/conf/mime.types) | ttc, otf, ttf, woff, woff2 and eot; font/sfnt is listed but commented out | Covered for every common ending |
| IIS 7 and later | Only the types in its staticContent list | Microsoft says IIS will not return file types that are not added to staticContent, so an unlisted font is not served |
On nginx, add the two missing lines inside the types block of mime.types: font/ttf ttf; and font/otf otf;. On IIS, add a mimeMap entry for each ending the server lacks in web.config, for example:
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".woff2" mimeType="font/woff2" />
</staticContent>
</system.webServer>
</configuration>
MIME type and CSS format name side by side
The format() hint in an @font-face rule does not use the MIME type. CSS Fonts Level 4 defines its own keywords:
| MIME type | CSS format() | Older string still accepted |
|---|---|---|
| font/woff2 | format(woff2) | format("woff2"), and format("woff2-variations") for format(woff2) tech(variations) |
| font/woff | format(woff) | format("woff"), format("woff-variations") |
| font/ttf | format(truetype) | format("truetype"), format("truetype-variations") |
| font/otf | format(opentype) | format("opentype"), format("opentype-variations") |
| font/collection | format(collection) | format("collection") |
| application/vnd.ms-fontobject | format(embedded-opentype) | None listed |
data:[<media-type>][;base64],<data>, so a small WOFF2 font becomes url(data:font/woff2;base64,...). Encode the file with Base64 Encode and Decode. Base64 makes the file larger, so keep this for small icon fonts.Optional parameters and collections
- outlines can be added to font/sfnt, font/ttf, font/otf and font/collection, with any of TTF, CFF and SVG, for example
font/otf; outlines="CFF". RFC 8081 says it lets a program skip a download it could not render. - layout on font/sfnt names the text shaping support: OTL, AAT or SIL.
- Picking one font from a collection. font/collection and font/woff2 allow a fragment that names a font by its PostScript name, such as
family.ttc#Foo-Bold. Characters like ^ must be escaped, so the name Caret^stick is written #Caret%5Estick.
Related pages
See the image MIME types list, the document MIME types list and the audio and video MIME types list for other files a site serves.
Sources and dates
| Page | Checked | Used for |
|---|---|---|
| IANA media types registry (font and application CSV exports) | 23 November 2026 | The six font types, deprecated application/font-woff and application/font-sfnt, application/vnd.ms-fontobject |
| RFC 8081: the font top-level media type (February 2017) | 23 November 2026 | Signatures, endings, parameters, fragments, unregistered names and the octet-stream rule |
| MDN: common media types and MDN: data URLs | 23 November 2026 | File endings, EOT type and data URL syntax |
| W3C CSS Fonts Module Level 4 | 23 November 2026 | format() keywords and older strings |
| nginx mime.types, nginx.conf and default_type | 23 November 2026 | nginx font defaults |
| Apache httpd mime.types | 23 November 2026 | Apache font defaults |
| Microsoft Learn: IIS mimeMap | 23 November 2026 | IIS behaviour and the web.config format |
Frequently asked questions
What is the MIME type for WOFF2?
font/woff2, registered with IANA through RFC 8081. Files start with the signature wOF2, and the matching CSS hint is format(woff2).
Is application/font-woff still correct?
No. The IANA registry marks application/font-woff as deprecated in favour of font/woff. It still works in many places, but new configs should send font/woff.
What is the MIME type for a TTF file?
font/ttf. Older configs often use application/x-font-ttf or font/truetype, but neither was ever registered.
What is the MIME type for an OTF file?
font/otf. The CSS format() keyword for the same file is opentype.
What is the MIME type for EOT fonts?
application/vnd.ms-fontobject. EOT is registered in the application tree, not under font, and its CSS format() keyword is embedded-opentype.
Why does nginx serve my TTF font as application/octet-stream?
The mime.types file shipped with nginx maps woff, woff2 and eot but not ttf or otf, so those files get the default_type, which the shipped nginx.conf sets to application/octet-stream. Add font/ttf ttf; and font/otf otf; to fix it.