TTF vs OTF vs WOFF vs WOFF2: Which Font Format Do You Need?

You buy or download a font and get a folder with several files in it. Or a designer sends you an OTF and your build tool wants WOFF2. Or a website asks for a TTF and all you have is a WOFF. The four extensions look interchangeable, and most explanations of them are a list of dates and standards bodies that leave you no better able to choose.

There is one distinction that makes the whole thing clear, and almost nobody leads with it: two of these four describe how the file is wrapped, and two describe how the letters are drawn. Once you can tell which is which, you know immediately which conversions are perfectly safe and which involve a compromise.

The two things a font file is

Every font here is an OpenType font. That surprises people who think of OTF as one option among four, but it is the umbrella specification that TTF, OTF, WOFF and WOFF2 all sit under. What varies is two independent choices.

The outline format is how each letter's shape is stored. There are two:

  • TrueType outlines use quadratic B-splines, kept in a table called glyf. Originally Apple's design, later adopted by Microsoft.
  • PostScript outlines use cubic Bézier curves, kept in a table called CFF. Originally Adobe's.

Cubic curves have two control points to a quadratic's one, so a designer can describe the same shape with fewer of them. Quadratics are cheaper for a rasteriser to evaluate. Neither is better; they are different trade-offs from different decades, and both are still in wide use.

The container is how that data is packaged into a file:

  • Raw SFNT - the plain, uncompressed table structure. Files named .ttf or .otf.
  • WOFF - the same tables with zlib compression and some metadata, built for the web.
  • WOFF2 - the same idea with Brotli compression plus font-specific preprocessing, which compresses substantially better.

So what are the four extensions?

They are combinations of those two choices, and the naming is not as tidy as you would like:

  • .ttf - raw container, almost always TrueType outlines.
  • .otf - raw container, usually PostScript outlines. This is the only real difference between a TTF and an OTF, and it is why they look like different formats but behave almost identically.
  • .woff - WOFF container, wrapping either outline type.
  • .woff2 - WOFF2 container, again wrapping either.

That last point is worth sitting with. A .woff2 file tells you how it is compressed and nothing at all about how its letters are drawn. Two WOFF2 files can be internally quite different, which is exactly why some tools that "unwrap WOFF to TTF" are being a little dishonest - if the WOFF contained PostScript outlines, the result is not really a TTF in the usual sense unless the outlines were converted too.

Which conversions are lossless

Here is the practical payoff of the distinction.

Changing the container is exactly lossless. TTF to WOFF2, WOFF to WOFF2, WOFF2 back to TTF - these repackage the same bytes with different compression. Nothing about the letterforms is touched. We checked this rather than assuming it: taking a 3,787-glyph font from TTF to WOFF2 and back produced 3,787 out of 3,787 glyphs byte-for-byte identical to the source.

Changing the outline format is an approximation. TTF to OTF, or OTF to TTF, means every glyph has to be redrawn in the other curve type. There is no exact conversion between quadratic and cubic curves in general, so the shapes are refitted to within a tolerance.

How much error? Our converters allow at most one font design unit of deviation. Fonts are drawn on a grid of 1000 or 2048 units per em, so at a 24-pixel reading size that is on the order of a fiftieth of a pixel - well below the rounding the rasteriser does anyway. You will not see it. But it is a redraw, and if you are the type designer working on masters rather than a developer shipping a website, that distinction matters and you should keep your originals.

How much smaller do the web formats get?

Real numbers from a real font - Noto Sans Mono, 3,787 glyphs:

  • TTF - 510,612 bytes
  • WOFF - 254,600 bytes, exactly half
  • WOFF2 - 175,192 bytes, about a third of the original

Your own font will differ, but the shape of the result holds: WOFF roughly halves a raw font, and WOFF2 takes off a third again. On a site loading three weights, choosing WOFF2 over raw TTF is comfortably a megabyte of savings, on the render-blocking path.

Note that .otf is not a compressed format, despite feeling more "modern" than TTF. In the same test, converting TTF to OTF produced a file slightly larger than the original.

Which one should you actually use?

  • A website - WOFF2, and only WOFF2. Browser support has been universal for years, and the old belt-and-braces stack of WOFF2 plus WOFF plus TTF now adds build complexity for a vanishing audience.
  • Installing on your computer - TTF or OTF, whichever you were given. Both install fine on Windows, macOS and Linux; neither WOFF nor WOFF2 is meant for installation.
  • Sending to a printer or a design agency - whatever the original was, ideally OTF. Never send a web font.
  • Embedding in an app or a game engine - usually TTF, because engine font loaders overwhelmingly expect TrueType outlines.
  • Archiving a font you paid for - keep the original files exactly as delivered.

Converting between them

All twelve directions between the four formats, in the browser and without an account:

Two limits worth knowing. The outline conversions cap out at 10,000 glyphs, because refitting curves costs real CPU time per glyph and a whole-Unicode or CJK family can run to 60,000 - the container conversions have no such limit and handle those fonts fine. And bitmap or colour fonts, such as emoji fonts, have no outlines to convert at all, so an outline conversion on one is rejected with a clear message rather than a broken file.

The licence question

Worth stating plainly because it catches people out: converting a font does not change what you are allowed to do with it. A great many commercial fonts are licensed for desktop use only, and putting one on a website requires a separate web licence, often priced by pageviews. The conversion is a technical operation and grants you nothing.

If you need a font for a site and the licence is unclear, the open families - Google Fonts, the SIL Open Font Licence catalogue - are genuinely good now and remove the question entirely.

One last note on privacy, since a font can be a purchased asset you are not free to redistribute: conversions here run entirely in server memory, are never written to a disk, and the file is discarded the moment your download is sent. Nothing is stored, and there is no copy of a licensed font sitting on our infrastructure afterwards.

Font converters:
TTF to WOFF2 OTF to WOFF2 WOFF2 to TTF TTF to OTF All font tools