Convert TTF to WOFF2
How to Convert TTF to WOFF2
A TTF or OTF up to 30 MB. Convert each weight and style you use on the site.
The font is compressed with Brotli on our server. Large fonts with thousands of characters can take up to a minute.
Put the WOFF2 next to your CSS and declare it with @font-face, as shown below.
Why WOFF2
WOFF2 is not a different font: it is the same TrueType or OpenType font, compressed for downloading. The browser unpacks it and uses exactly the letters, spacing, kerning and hinting of your TTF.
Measured on two common fonts
| Font | TTF | WOFF | WOFF2 |
|---|---|---|---|
| DejaVu Sans | 760 KB | 381 KB | 258 KB |
| Liberation Sans | 411 KB | 202 KB | 143 KB |
- About a third of the TTF size is typical, and roughly 30% smaller than the older WOFF format.
- Every current browser — Chrome, Edge, Firefox, Safari, on desktop and phone — supports WOFF2. A WOFF fallback is only needed for Internet Explorer 11 and similarly old browsers.
- WOFF2 cannot be installed on a computer. Keep your TTF for that, or turn a WOFF2 back into TTF with the font converter.
- Variable fonts (one file with a weight slider) work too: the WOFF2 keeps all the variations.
The CSS
@font-face {
font-family: "My Font";
src: url("/fonts/myfont.woff2") format("woff2");
font-weight: 400;
font-style: normal;
font-display: swap;
}
body { font-family: "My Font", Arial, sans-serif; }
- One block per file: regular, bold and italic each need their own
@font-facewith the matchingfont-weightandfont-style, all under the samefont-familyname. - font-display: swap shows the fallback font straight away and swaps in yours when it arrives, so text is never invisible.
- Preload the main font to start the download earlier:
<link rel="preload" href="/fonts/myfont.woff2" as="font" type="font/woff2" crossorigin>. Thecrossoriginattribute is needed even on your own domain. - Fonts on another domain (for example a CDN) only load if that server sends an
Access-Control-Allow-Originheader. - Check the licence: fonts under the SIL Open Font License may be used on websites; many commercial fonts need a separate web licence.
Frequently Asked Questions
Does WOFF2 change how the font looks?
No. WOFF2 is lossless packaging: the browser gets back the same font you uploaded, including kerning, ligatures and hinting.
Do I still need WOFF or TTF on my website?
Not for current browsers — WOFF2 alone is enough. Add a WOFF file only if visitors still use Internet Explorer 11 or very old phones.
Can I convert an OTF to WOFF2?
Yes. OTF fonts are packed the same way and keep their PostScript outlines inside the WOFF2.
Is my font kept?
No. The uploaded font and the WOFF2 are deleted from our server within 4 hours.