March 24, 20265 min read

TTF to WOFF2 — The Font Conversion Every Web Developer Needs

Convert TTF desktop fonts to WOFF2 for the web. 30-50% smaller, faster loading, better compression. How it works and the best tools.

ttf to woff2 web fonts font conversion woff2 web performance font optimization
Ad 336x280

Why Your Website Shouldn't Be Serving TTF Fonts

If your CSS looks like this:

@font-face {
  font-family: 'CustomFont';
  src: url('/fonts/custom.ttf') format('truetype');
}

You're sending 30-50% more data than necessary on every page load. TTF (TrueType Font) was designed for desktop operating systems in 1991. WOFF2 (Web Open Font Format 2) was designed for the web in 2018.

The difference is dramatic:

FontTTF SizeWOFF2 SizeSavings
Inter Regular312 KB98 KB69%
Roboto Regular168 KB64 KB62%
Open Sans Regular217 KB87 KB60%
Source Code Pro195 KB72 KB63%
Custom display font85 KB38 KB55%
That's not a rounding error — WOFF2 is genuinely 50-70% smaller than TTF for most fonts.

How WOFF2 Achieves This

WOFF2 uses Brotli compression — the same algorithm Chrome uses for HTTP compression. But it doesn't just blindly compress the font file. The WOFF2 encoder includes font-specific preprocessing:

  1. Table restructuring: Reorganizes font tables for better compression
  2. Glyph data transformation: Specialized delta encoding for outline data
  3. Brotli compression: General-purpose compression on the preprocessed data
The font-specific preprocessing is what makes WOFF2 much better than just gzip-ing a TTF file. A TTF compressed with gzip is about 40% smaller. WOFF2 is 50-70% smaller.

Browser Support: Universal

As of 2026, WOFF2 is supported by every browser that matters:

BrowserWOFF2 Support Since
Chrome2014 (v36)
Firefox2015 (v39)
Safari2015 (v10)
Edge2015 (v14)
Opera2014 (v23)
Samsung Internet2015
iOS Safari2015 (iOS 10)
There is no modern browser that doesn't support WOFF2. The only holdout was IE11, which is dead and buried.

How to Convert

Online Tools

MyPDF's font converter handles TTF to WOFF2. Other options include Font Squirrel's Webfont Generator (excellent, with subsetting) and Transfonter. Desktop tools like FontForge (free, open-source) also handle this conversion.

Command Line

Font Squirrel Webfont Generator (free, web-based): Upload your TTF → Choose WOFF2 → Download. Also supports subsetting (removing unused characters) during conversion — more on that below. Transfonter (free, web-based): Another solid option with subsetting, format selection, and Unicode range control. MyPDF Font Converter: Quick online conversion for single files or small batches.

For Web Developers

Pre-convert your fonts and commit the WOFF2 files to your project. Most modern build tools (webpack, Vite) can serve WOFF2 as static assets.

Subsetting: The Real Performance Win

Converting TTF to WOFF2 saves 50-70%. But subsetting — removing characters you don't use — can save 90%+.

A typical font file contains glyphs for Latin, Cyrillic, Greek, Vietnamese, and various symbols. If your website is English-only, you only need Basic Latin and maybe Latin Extended.

In Font Squirrel's generator, check "Subsetting" and select "Latin" under character sets. The results are dramatic — here's Inter Regular as an example:








VersionSize
TTF (full)312 KB
WOFF2 (full)98 KB
WOFF2 (Latin subset)18 KB

From 312 KB to 18 KB — a 94% reduction — with no visible difference for English-language sites.

The @font-face Declaration (Best Practice)

@font-face {
  font-family: 'CustomFont';
  src: url('/fonts/custom.woff2') format('woff2');
  font-display: swap;
  font-weight: 400;
  font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153; / Latin /
}

Key details:


  • Only WOFF2: No need for TTF/WOFF fallbacks in 2026

  • font-display: swap: Shows fallback font while custom font loads (prevents invisible text)

  • unicode-range: Browser only downloads the font if the page uses characters in this range


Variable Fonts: One File to Rule Them All

If your font family has multiple weights (Regular, Bold, Light, etc.), each weight is traditionally a separate file. Variable fonts combine all weights (and sometimes widths/italics) into a single file:

ApproachFilesTotal Size (WOFF2)
Static (Regular + Bold)2180 KB
Static (4 weights)4360 KB
Variable (all weights)1120 KB
A single variable WOFF2 file is smaller than two static files while giving you access to every weight from 100 to 900.

Frequently Asked Questions

Can I convert WOFF2 back to TTF?

Yes, it's lossless. The conversion is just compression — no glyph data is lost. Any WOFF2 file can be converted back to the original TTF.

Do Google Fonts serve WOFF2?

Yes, automatically. When you use Google Fonts, the CDN serves WOFF2 to all modern browsers. But self-hosting WOFF2 files is better for performance (one fewer DNS lookup) and GDPR compliance.

What about font licensing?

Converting a font format doesn't change its license. A font licensed for desktop use may not be licensed for web embedding. Always check the font license before serving it on a website. Most popular open-source fonts (Inter, Roboto, Open Sans) allow web use.

Does WOFF2 support color/emoji fonts?

Yes. WOFF2 supports all OpenType features including COLRv1 color fonts. Emoji fonts and multi-color display fonts work fine in WOFF2.
Ad 728x90