How to convert a TTF to WOFF2

WOFF2 is what a browser wants: the same glyphs in a container that is usually a third to half the size. Here is the whole job, from dropping the file to writing the @font-face rule.

Before you start

You need the desktop font — a .ttf or .otf — not a web font you downloaded from someone else's site. If all you have is a .woff2, this is the wrong tool; unpacking it is a separate guide.

Convert it

  1. Open the TTF to WOFF2 converter.
  2. Drop the file, or choose it. You can add a whole family — regular, bold, italic — at once.
  3. The page already has WOFF2 selected, because that is what this tool is for. Press Convert.
  4. Download the result. It keeps the original name and gains the .woff2 extension.

Put it on the site

Upload the file to a /fonts/ folder and point at it from CSS:

@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

The @font-face generator writes this rule for you, with the real family name, weight and style read from the font instead of guessed.

The mistake to avoid

Do not rename a .ttf to .woff2. It looks like a one-second shortcut and it fails in every browser: WOFF2 is a different container, not a different extension. The file has to be compressed.

Also resist adding a WOFF fallback by reflex. Every browser released since 2016 reads WOFF2; a second format only helps embedded devices and intranet browsers frozen in the past.

How much smaller is it, really?

On a typical Latin text face, expect 30–50%. In a test with a 515 KB Roboto, the WOFF2 came out at 177 KB — 66% smaller — because the outlines are repetitive and Brotli exploits that. Script and CJK fonts usually compress less, since their outlines are more varied.

Convert a font to WOFF2

Open TTF to WOFF2 Converter

All guides