WOFF2 Font MIME Type
font/woff2 files contain, how WOFF2 compresses web fonts, how to use them, and what Poly supports. MIME type details for font/woff2
In active use| MIME type | font/woff2 |
|---|---|
| Extensions | .woff2 |
| Magic number | 77 4F 46 32 (wOF2) |
| First standardized | 2014 |
| Created by | W3C WebFonts Working Group |
| Browser support | Chrome, Edge, Firefox, Opera, Safari |
| Example applications | Google Chrome, Mozilla Firefox |
| Poly support | Partial. Poly recognizes font/woff2 and .woff2 files and stores, syncs, shares, and versions them, but does not decode or inspect the enclosed font tables. |
| Indexed by Poly | Partial. Poly indexes the filename and ordinary file properties, but not family names, glyph coverage, licensing metadata, or other font contents. |
| Preview in Poly | No. WOFF2 files receive a generic file view rather than a rendered font specimen; download or use the font in a web page to inspect it. |
| Poly agent | No. The Poly agent cannot read glyphs, naming tables, layout features, or other contents of a WOFF2 file. |
What does font/woff2 mean?
The font/woff2 media type identifies a Web Open Font Format 2.0 resource. A .woff2 file packages an sfnt-based font, usually TrueType or OpenType, for efficient delivery to a web browser. It preserves the font's glyphs, character mappings, metrics, layout features, variation data, and other supported tables while representing them in a more compact transport format.12
WOFF2 is a container, not a new kind of outline. Two .woff2 files can enclose very different fonts, including TrueType outlines, CFF outlines, variable fonts, color fonts, or a font collection. A browser decodes the package before its font and text-shaping systems use those tables.2
.woff2 file is intended primarily as a linked web resource. It is not automatically an installable desktop font, and changing its extension to .ttf or .otf does not decompress it.How to identify a WOFF2 file
Every valid WOFF2 file starts with the four-byte signature 77 4F 46 32, which spells wOF2 in ASCII. The W3C specification assigns this value as 0x774F4632 and requires a user agent to reject a file whose signature does not match.2
The 48-byte header also records the underlying sfnt flavor, the file length, the number of font tables, compressed and reconstructed sizes, version fields, and offsets for optional metadata and private-data blocks. The signature identifies the container, but the header and table directory must still be validated. A filename ending in .woff2 is not proof that the data is a valid font.2
IANA lists one registered extension, .woff2, and no required or optional media-type parameters. Serve the file as Content-Type: font/woff2 rather than application/octet-stream or an old application/x-font-* label.1
Where WOFF2 came from
The W3C WebFonts Working Group published the first public WOFF2 draft on May 8, 2014. The format reached Candidate Recommendation in 2016 and became a W3C Recommendation on March 1, 2018.3 RFC 8081 had established the dedicated font top-level media type and registered font/woff2 in February 2017.4
WOFF2 built on WOFF 1.0, which used per-table Flate compression. Its designers wanted smaller transfers without imposing excessive decoding cost on mobile devices. WOFF2 first restructures selected font tables to remove or compact redundant information, then compresses the combined table stream with Brotli. Decoding reconstructs a functionally equivalent sfnt font, although transformed tables need not be byte-for-byte identical to the original representation.25
How much smaller is WOFF2 than WOFF?
File-size savings depend on the source font, its outline technology, its tables, and the encoder. W3C reported results from three development datasets: about 1,100 TrueType fonts from Google Fonts, 33,000 TrueType fonts from Monotype, and an Adobe corpus of 13,900 TrueType plus 5,000 CFF fonts. In that evaluation, every tested WOFF2 output was smaller than its WOFF 1.0 counterpart.5
| Source outline group | Reported average improvement over WOFF 1.0 |
|---|---|
| TrueType outlines | 27% smaller |
| CFF / Type 1 outlines | 13.5% smaller |
These figures describe those corpora and the encoders used during WOFF2 development. They are not a guaranteed saving for an individual font. Subsetting away unused characters can have a larger effect than changing containers, while a small or already carefully optimized source may show a smaller difference.
How to use a .woff2 file in a website
Current Chrome, Edge, Firefox, Opera, and Safari can load WOFF2 through CSS @font-face. MDN describes WOFF2 as the normal web-delivery choice because it combines efficient compression with broad modern-browser support.6
@font-face {
font-family: "Example Sans";
src: url("/fonts/example-sans.woff2") format("woff2");
font-style: normal;
font-weight: 100 900;
font-display: swap;
}
Return Content-Type: font/woff2. If the font is hosted on a different origin from the page, configure an appropriate CORS response because web fonts are subject to cross-origin access controls.6
Opening a .woff2 URL directly may download the file or show a browser's generic resource view. The reliable way to inspect its appearance is to reference it from a small HTML and CSS specimen. For table-level inspection, first decode it with a trusted font-aware tool, then validate the reconstructed font. Browser developer tools can confirm whether the request succeeded and which face was actually used.
Support in Poly
Poly recognizes the .woff2 extension and maps it to font/woff2. It can store, sync, share, version, download, and find the file by name. The shared MIME schema classifies WOFF2 as an unknown media category, however, so it follows Poly's generic-file path rather than an image, document, or text-processing pipeline.
That means Poly does not:
- Decode the Brotli-compressed font data or parse its WOFF2 header and table directory.
- Extract family and style names, glyph coverage, variation axes, OpenType features, or license records.
- Generate a specimen, glyph map, thumbnail, or interactive font preview.
- Add glyphs or internal metadata to full-text, semantic, or similarity indexes.
- Expose the enclosed font tables to the Poly agent.
Download the file and use it in a test page or a trusted font tool when you need to inspect its actual typeface or metadata.
WOFF2, WOFF, TTF, and OTF compared
These formats are closely related, but they serve different delivery and authoring roles.
| Format | MIME type | Typical extension | Main role |
|---|---|---|---|
| WOFF2 | font/woff2 | .woff2 | Modern compressed web-font packaging |
| WOFF 1.0 | font/woff | .woff | Older web-font packaging using Flate compression |
| TrueType | font/ttf | .ttf | Installable or editable sfnt font, normally with TrueType outlines |
| OpenType | font/otf | .otf | Installable or editable sfnt font, commonly with CFF or CFF2 outlines |
WOFF2 and WOFF can be offered in parallel because they have different MIME types. For modern browser targets, WOFF2 is normally sufficient. A WOFF fallback matters only when a project's compatibility requirements include browsers without WOFF2 support.26
Converting and subsetting WOFF2
Use a font-aware encoder or decoder rather than a general archive utility:
- TTF or OTF to WOFF2: creates a web-delivery copy. Check that the license permits web embedding and conversion.
- WOFF2 to TTF or OTF: reconstructs an
sfntfont for inspection or editing. The decoded tables may be functionally equivalent without matching the original source bytes.2 - WOFF2 to WOFF: useful only for an older-browser fallback. Decode and re-encode with a font tool; renaming the suffix is not conversion.
- Subsetting: removes unused characters and possibly layout data. It can save substantial bandwidth, but missing characters fall back to another face and damaged shaping tables can break complex scripts.
Generate separate subsets only when the CSS unicode-range values and fallback behavior are well tested. Keep the full licensed source so you can regenerate files when language coverage or browser requirements change.
Security, privacy, and licensing
WOFF2's compression does not make an untrusted font safe. Fonts contain complex tables, and TrueType hinting can include interpreted instructions. RFC 8081 warns that malicious fonts can consume excessive CPU or memory and that extensible font structures can conceal arbitrary binary content.4
WOFF2 may also contain extended metadata and an arbitrary private-data block. Font formats do not provide confidentiality, so inspect these areas before publishing a proprietary or commissioned font.24 Finally, compression, conversion, and subsetting do not grant a web-font license. Confirm that the license permits hosting, modification, and redistribution before deploying the file.
Footnotes
- Internet Assigned Numbers Authority. font/woff2 Media Type Registration. ↩ ↩2
- World Wide Web Consortium. WOFF File Format 2.0. W3C Recommendation. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8
- World Wide Web Consortium. WOFF File Format 2.0 Publication History. ↩
- Lilley, C. RFC 8081: The
fontTop-Level Media Type. Internet Engineering Task Force, February 2017. ↩ ↩2 ↩3 - Lilley, C. WOFF 2.0, the Inside Scoop. World Wide Web Consortium, March 1, 2018. ↩ ↩2
- MDN Web Docs.
@font-face. ↩ ↩2 ↩3