File types · Explainer

The WOFF file (.woff)

A WOFF file is a font wrapped for the web: a TrueType or OpenType font with each of its tables compressed, plus room for licence information. This guide explains what's inside one, how it compares with WOFF2, the quirks worth knowing, and has free sample WOFF files to download for testing.

At a glance

Full name
Web Open Font Format (version 1.0)
Extensions
.woff
MIME type
font/woff (RFC 8081, 2017); the older application/font-woff is deprecated but still seen
Kind
Binary wrapper around a TrueType or OpenType font, each table compressed losslessly with zlib
Standard
W3C Recommendation, 13 December 2012
First released
2009, by Jonathan Kew (Mozilla), Tal Leming and Erik van Blokland; first supported in Firefox 3.6
Opens with
Web browsers (through CSS @font-face), FontForge, fontTools; most desktop systems can't install it directly
Extras
Optional XML metadata block (licence, credits) and private data block
Browser support
Every current browser, and Internet Explorer 9 onwards
Magic number
77 4F 46 46 (wOFF)

The basics

What is a WOFF file?

A WOFF file is a desktop font repackaged for websites. Inside is a complete TrueType or OpenType font: every table, every glyph. WOFF compresses each table with zlib, the same compression used in ZIP and PNG files, and adds two optional blocks for metadata. A browser unpacks it and uses the font exactly as the original.

WOFF was the first font format that every major browser agreed on. Before it, Internet Explorer used EOT, other browsers took raw TTF and OTF files, and font makers were reluctant to license fonts for the web as ordinary desktop files anyone could install. WOFF gave them a web-only package with room for licence information, and browsers a single format.

Today WOFF2 does the same job with better compression, and is what most sites serve. WOFF files are still common in older projects, theme packages and icon fonts, and every browser still reads them.

Anatomy

What's inside a WOFF file

A WOFF file is a 44-byte header, a directory with 20 bytes per table, the tables themselves (each compressed on its own), and optionally a metadata block and a private block at the end. Below is our sample-regular.woff. All numbers are big-endian: 00 00 17 CC is 0x17CC, which is 6,092.

sample-regular.woff (hex)
offset  bytes                                  meaning
000000  77 4F 46 46                            signature "wOFF"
000004  00 01 00 00                            flavor: TrueType outlines
000008  00 00 17 CC                            length: 6,092 bytes
00000C  00 0A                                  10 tables
00000E  00 00                                  reserved
000010  00 00 2D 4C                            decoded font size: 11,596
000014  00 01 00 00                            font version 1.0
000018  00 00 00 00 … (20 bytes)               no metadata, no private data
        table directory, 20 bytes per table:
        tag         offset      compressed  original    checksum
00002C  4F 53 2F 32 00 00 01 64 00 00 00 42 00 00 00 60 5A 99 5C 1A
000040  63 6D 61 70 00 00 02 A8 00 00 00 C4 00 00 01 06 0F A9 0E 75
000054  67 6C 79 66 00 00 04 34 00 00 0F FA 00 00 1E E0 49 2B 66 13
000068  68 65 61 64 00 00 00 F4 00 00 00 36 00 00 00 36 30 8D 4A AA
00007C  68 68 65 61 …  hhea   30 of 36 bytes
000090  68 6D 74 78 …  hmtx   254 of 396 bytes
0000A4  6C 6F 63 61 …  loca   200 of 200 bytes (stored)
0000B8  6D 61 78 70 …  maxp   24 of 32 bytes
0000CC  6E 61 6D 65 …  name   752 of 2,208 bytes
0000E0  70 6F 73 74 …  post   171 of 232 bytes
0000F4  00 01 00 00 00 01 00 00 …               head table, stored as is
00012C  78 9C 63 60 …                          hhea table, zlib-compressed
0017CC                                         end of file: 6,092 bytes
  1. 177 4F 46 46

    The signature

    The ASCII letters wOFF. A WOFF 2.0 file starts with wOF2 instead, so the two are easy to tell apart.

  2. 200 01 00 00

    The flavor

    The first four bytes of the font inside: 00 01 00 00 for TrueType outlines, OTTO for CFF outlines, as in our sample-cff.woff.

  3. 300 00 2D 4C

    The decoded size

    How big the font will be after unpacking: 11,596 bytes, which is the original 11,588-byte TTF plus padding between tables.

  4. 400 01 00 00

    The version

    A major and minor version number for the font, here 1.0. It's informational: browsers don't use it.

  5. 500 00 00 00 … (20 bytes)

    Metadata and private data

    Offset and both lengths of the XML metadata block, then offset and length of the private block. All zero in this file; sample-metadata.woff fills them in.

  6. 64F 53 2F 32 00 00 01 64 …

    A directory entry

    The table name OS/2, where its data starts (356), its compressed length (0x42, 66 bytes), its original length (0x60, 96 bytes) and the original table's checksum. Entries are sorted by tag.

  7. 767 6C 79 66 … 00 00 0F FA 00 00 1E E0

    The glyph outlines

    glyf shrinks from 7,904 to 4,090 bytes. Outlines are most of a font's size, so they decide how big the WOFF file is.

  8. 868 65 61 64 … 00 00 00 36 00 00 00 36

    A table stored as is

    head has a compressed length equal to its original length, 54 bytes: compressing it wouldn't have made it smaller, so the encoder stored it raw. loca is stored the same way.

  9. 978 9C 63 60 …

    The table data

    The tables follow the directory, each padded to a 4-byte boundary. head comes first here, raw; hhea after it is a zlib stream, recognisable by its first bytes 78 9C. A reader can unpack just the tables it needs.

Under the hood

How a WOFF file is built

Converting a font to WOFF is simple, which is part of why the format caught on:

  1. 1Take each table of the font (cmap, glyf, head, name and so on) and compress it separately with zlib.
  2. 2Keep the compressed version only if it's smaller. Otherwise store the table as it was, like head and loca in our sample.
  3. 3Write a directory listing each table's position, compressed and original length, and original checksum, so a decoder can check its work.
  4. 4Optionally add a metadata block: UTF-8 XML, compressed with zlib, describing the font's vendor, credits, licence and copyright.
  5. 5Optionally add a private block at the very end, for the font maker's own data. Its format is undefined, and browsers ignore it.

Decoding reverses these steps and gives back a working font with the same tables. Because every table is compressed on its own, a tool can read one table, such as name to show the font's name, without unpacking the whole file.

The metadata block in practice

The specification says metadata must not affect how a font loads or renders, and browsers don't show it to visitors. It's for people and tools inspecting the file. Our sample-metadata.woff includes one: a <metadata> document with uniqueid, vendor, credits, description, license and copyright elements.

Related formats

WOFF vs WOFF2 vs TTF and OTF

WOFFWOFF2TTF / OTF
Made forThe webThe webInstalling on computers; also accepted by browsers
Compressionzlib, table by tableBrotli, all tables together, after reshaping the outlinesNone
Our regular sample6,092 bytes4,428 bytes11,588 bytes (TTF)
Browser supportAll current browsers, IE 9+All current browsers, not IEAll current browsers
Install on Windows or macOSNo, convert firstNo, convert firstYes
Metadata blockYes, zlib-compressed XMLYes, Brotli-compressed XMLNo; licence text lives in the name table
MIME typefont/wofffont/woff2font/ttf, font/otf

For a site that only supports current browsers, serve WOFF2 alone. A WOFF fallback after it costs nothing for modern visitors, because a browser stops at the first source it can use:

style.css
@font-face {
  font-family: "99helpers Sample";
  src: url("/fonts/sample-regular.woff2") format("woff2"),
       url("/fonts/sample-regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}

Troubleshooting

Why isn't my WOFF font working?

  • CORS errors. Browsers fetch fonts in CORS mode, so a WOFF file on another domain or CDN needs an Access-Control-Allow-Origin header from that server. Without it the font is blocked and the console shows why.
  • Old MIME type. Servers set up years ago often send application/font-woff or application/x-font-woff. Browsers still accept the font, but font/woff is the registered type.
  • Order of sources. If WOFF comes before WOFF2 in src, every browser takes the larger WOFF file. List WOFF2 first.
  • Double-clicking it does nothing useful. Desktop systems don't install WOFF. Convert it to TTF or OTF, with fontTools or FontForge, if the licence allows desktop use.
  • Icon fonts showing letters or boxes. Icon fonts map pictures to private-use code points. If the WOFF file fails to load, the browser shows those code points in a fallback font, usually as empty boxes.

How to

How to open and convert a WOFF file

  • Preview it: use it in a page with @font-face, or open it in FontForge. The specimen on this page draws our sample with the file itself.
  • Convert to TTF or OTF: in Python with fontTools, open the file with TTFont('font.woff'), set font.flavor = None and save it as font.ttf (or .otf if the flavor is OTTO). FontForge can do the same through File, Generate Fonts.
  • Convert to WOFF2: set font.flavor = 'woff2' in fontTools (it needs the brotli package), or decode to TTF and run Google's woff2_compress.
  • Read the metadata block: fontTools keeps it in font.flavorData.metaData; any zlib tool can decompress it from the offset in the header.
  • List the tables: ttx -l font.woff shows each table with its length and checksum.

Rights

Licences and fonts on the web

Two of WOFF's three authors are type designers, and the format's metadata block gives font makers a place to say who made the font and under which terms, travelling with the file. It isn't copy protection: WOFF is not encrypted and has no DRM. What protects a font is its licence, helped a little by the fact that WOFF files can't be installed as they are.

  • Check the licence before converting. A desktop licence often doesn't cover web use. Open-source licences such as the SIL Open Font License allow it.
  • Look inside the font. The name table holds the copyright and licence text, and the OS/2 table's fsType field records embedding permissions. Browsers generally don't enforce fsType, but it tells you what the maker intended.
  • Fonts are software, and font parsers have had security bugs. Chrome and Firefox check every web font with the OpenType Sanitizer before using it, which also rejects damaged files.

Free downloads

Sample WOFF files to download

Free sample WOFF fonts for testing @font-face set-ups, font loaders, converters and upload filters. They use 99helpers Sample, an original geometric typeface we drew for these pages, with Latin letters, digits, common punctuation and a few accented letters.

sample-regular.woff · 5.9 KBDownload

Aa Gg 99

ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
0123456789 .,:;!?&@#()

14pxThe quick brown fox jumps over the lazy dog

20pxThe quick brown fox jumps over the lazy dog

32pxThe quick brown fox jumps over the lazy dog

48pxThe quick brown fox jumps over the lazy dog

What's inside sample-regular.woff

The regular weight with TrueType outlines, encoded with fontTools. The specimen above is drawn with this exact file.

  1. Header

    The wOFF signature, the TrueType flavor 00 01 00 00, a length of 6,092 bytes and 10 tables.

  2. Table directory

    Ten 20-byte entries sorted by tag, each with offset, compressed length, original length and checksum.

  3. Compressed tables

    Eight tables are zlib streams; head and loca are stored uncompressed because compression wouldn't have helped.

  4. Glyphs

    99 glyphs: A to Z, a to z, 0 to 9, space, .,:;!?&@#()-'"/, and á à â ä é è ê ë í ï ó ô ö ú ü ñ É Ü Ñ.

  5. Names and licence

    Family 99helpers Sample, style Regular, weight class 400, with the licence and a link back to this page in the name table.

All sample WOFF files

  • Regular weight

    sample-regular.woff · 5.9 KB (6,092 bytes)

    99helpers Sample Regular (weight 400) with TrueType outlines, 99 glyphs. No metadata block.

    • Testing `@font-face` and fallbacks
    • Checking a server sends `font/woff`
  • Bold weight

    sample-bold.woff · 5.9 KB (6,056 bytes)

    The same family at weight 700, drawn with a heavier stroke. Declare it with the regular file under one family name.

    • Testing weight matching
    • Comparing real bold with the browser's synthetic bold
  • WOFF with CFF outlines

    sample-cff.woff · 6.4 KB (6,512 bytes)

    The regular font with PostScript-style CFF outlines (cubic curves) instead of TrueType ones. The header's flavor field is OTTO.

    • Testing decoders and converters with both kinds of outlines
    • Checking that tools keep `.otf` output for CFF fonts
  • WOFF with metadata and private data

    sample-metadata.woff · 6.4 KB (6,517 bytes)

    The regular font plus an extended metadata block (366 bytes of zlib-compressed XML: vendor, credits, description, licence, copyright) and a 57-byte private data block at the end.

    • Testing tools that read or strip WOFF metadata
    • Checking browsers ignore the extra blocks

Ways to test with them

  • Fallback order: list sample-regular.woff after a WOFF2 file in src and check in the network panel that only the WOFF2 file downloads.
  • MIME type: request the file with curl -I and look for Content-Type: font/woff.
  • Outline types: convert sample-regular.woff and sample-cff.woff back to desktop fonts; the first should give a TTF, the second an OTF with a CFF table.
  • Metadata: open sample-metadata.woff in fontTools and print font.flavorData.metaData; a converter that drops the block is losing licence information.

Free to use for testing, teaching and demos, commercially or not, with no attribution needed. A link back to this page is always appreciated.

Put it online

Have a WOFF file? Give it a link.

Drop a WOFF file on 99helpers and it gets its own address in seconds. Opening the link downloads the font, since browsers don't display font files on their own, and a page or site you host on 99helpers can load it with @font-face.

Questions

WOFF files, frequently asked

What is a WOFF file?

A font packaged for websites: a TrueType or OpenType font with its tables compressed with zlib. Browsers load it through CSS @font-face.

How do I open a WOFF file?

Use it in a web page with @font-face, or open it in a font editor such as FontForge. Browsers don't display font files on their own when you open them directly.

Can I install a WOFF font on my computer?

Not as it is. Convert it to TTF or OTF with fontTools or FontForge, then install that, if the font's licence allows desktop use.

Should I use WOFF or WOFF2?

WOFF2 for any current site: it is smaller and supported by every current browser. WOFF is only needed as a fallback for browsers from before about 2016.

What is the MIME type for WOFF?

font/woff, registered in RFC 8081 in 2017. The older application/font-woff is deprecated but still works in browsers.

Is a WOFF file the same font as the TTF?

Yes, in what matters: the same glyphs, metrics and features. Only the packaging differs, and converting back gives a working TTF or OTF.

Does WOFF protect a font from being copied?

No. It isn't encrypted and has no DRM. Anyone can save and convert a WOFF file; what you may do with it is set by the font's licence.

Related formats

Other file types explained

Keep going

Related

Sources

Last reviewed 27 October 2026.