TTF to WOFF2 Web Font Compressor

WOFF2 is the only web font format worth serving in 2026. It is a TrueType or OpenType font wrapped in Brotli compression with font-specific preprocessing, and every browser in current use supports it. Conversion runs here as WebAssembly.

How to use it

  1. Drop in a .ttf file.
  2. A WebAssembly build of the reference compressor produces the WOFF2.
  3. Download the compressed font.

What the compression achieves

WOFF2 typically reduces a TTF by 40 to 60 percent, and lands around 30 percent below the older WOFF format. The gain comes from Brotli plus a preprocessing step that reorganises the font tables into a form that compresses more predictably.

The decompressed font in memory is identical to the original. Nothing about the glyph outlines, hinting, or metrics changes, so rendering is unaffected. This is purely a transport optimisation.

Subsetting saves far more than compression does

A full Latin text font carries several hundred glyphs. A font with extended Latin, Cyrillic, and Greek coverage can carry several thousand. Most sites use a few dozen characters in any given face.

Subsetting, meaning stripping the font down to the glyphs you actually use, routinely cuts a font by 80 to 90 percent, which dwarfs what compression alone delivers. The two combine: subset first, then convert to WOFF2. For a page rendering only basic Latin, a subsetted WOFF2 can be a tenth of the original TTF.

Subsetting requires knowing your character set, so it is a build-step job rather than a drop-a-file job. pyftsubset from the fonttools package is the standard tool, and Google Fonts already serves subsetted WOFF2 automatically via unicode-range.

Licensing is the part people skip

Converting a font to WOFF2 is a format change, and format changes are governed by the font licence. A desktop licence, which is what you get when you buy a font for use in design software, very often does not include webfont embedding rights. Those are usually sold separately and sometimes priced by monthly pageview.

Because a WOFF2 sits on a public URL, a self-hosted webfont is downloadable by anyone who views the page. Foundries are aware of this and licence accordingly. Check the EULA before deploying a converted commercial font. Open licences such as the SIL Open Font License explicitly permit conversion and redistribution, which is one reason open fonts dominate self-hosting.

Loading behaviour

Serving a smaller font does not by itself prevent a flash of invisible text. Add font-display: swap to the @font-face rule so the browser renders fallback text immediately and swaps when the font arrives, and preload the font file if it is used above the fold.

At a glance

Accepted input.ttf
Output.woff2, Brotli-compressed
Typical reduction40 to 60 percent versus TTF
EngineWebAssembly build of the reference encoder

Frequently asked questions

Do I still need WOFF as a fallback?

No. Every browser in current use supports WOFF2. Serving a WOFF fallback adds build complexity for a population that has essentially disappeared.

Should I subset before converting?

Yes, if you can. Subsetting typically removes 80 to 90 percent of a font, far more than compression does. Use pyftsubset, then convert the result here.

Is it legal to convert a commercial font for web use?

It depends entirely on the licence. Desktop licences frequently exclude webfont embedding, which is sold separately. Check the EULA. Open Font License fonts explicitly allow it.

Does conversion change how the font renders?

No. Outlines, hinting, and metrics are preserved exactly. Only the transport encoding changes.

Read more

Choosing an image format — Why the same photograph can be 40 KB or 4 MB depending on a single dropdown, and how to choose deliberately.

Related tools