TTF to WOFF2 Converter

Compress a TTF or OTF font for the web — smaller files, no upload.

Ad placeholder (leaderboard)

To ship a custom font on the web you want it small. A raw .ttf can be hundreds of kilobytes; wrapping it in a compressed web-font container cuts that dramatically. This converter reads a TrueType or OpenType file in your browser, compresses its tables, and packs them into a web-deliverable font, reporting exactly how many bytes you saved.

How it works

An SFNT font (TTF/OTF) is an offset table plus a directory of named tables (glyf, cmap, name, and so on). A web-font container keeps that same table structure but compresses each table’s bytes.

The tool reads the source offset table, walks its directory, and for each table compresses the data with the browser’s native CompressionStream. It then writes the web-font header — signature, flavour (the original SFNT version), table count, and total size — followed by a directory whose entries record each table’s compressed offset, compressed length, and original length, then the compressed table blocks themselves with 4-byte alignment.

WOFF2 specifically requires Brotli for that compression. When the browser exposes Brotli through CompressionStream, the output is true WOFF2. When it does not, the tool falls back to a valid WOFF (v1) file using Deflate — supported everywhere — and clearly labels which format it produced so your @font-face rule matches.

Notes and tips

  • Compression is lossless; the font renders identically once unwrapped by the browser.
  • Subset your font first (drop unused glyphs/scripts) for the biggest wins — compression helps, subsetting helps more.
  • Serve the file with a year-long cache header and the correct MIME type (font/woff2 or font/woff).
  • Always confirm the font’s licence permits web embedding before deploying it.
Ad placeholder (rectangle)