Convert fonts between TTF, OTF, WOFF and WOFF2 in your browser, preview them, and get a ready @font-face rule. Every result is checked first.
Initializing in your browser…
Convert images between PNG, JPEG, WebP, GIF and BMP (and AVIF where your browser supports it), one at a time or in a batch, and compare how big each format makes your picture.
Convert Unix timestamps to dates and dates to timestamps in any time zone, with seconds, milliseconds, microseconds and nanoseconds detected automatically.
Convert audio between MP3, M4A, WAV, FLAC, OGG and AAC in your browser, with a choice of quality, sample rate, channels and bit depth.
You want to self-host STIX General, a serif font distributed as an OTF file, on a website.
Font file
serif.otf, 369,156 bytes STIXGeneral Regular, weight 400, 3,302 glyphs PostScript (CFF) outlines, 13 tables
Conversions
WOFF2 212,864 bytes (58% of the original), loads in the browser
WOFF 257,168 bytes (70%), loads in the browser
TTF not offered: the CFF outlines would have to be redrawn
@font-face {
font-family: 'STIXGeneral';
src: url('serif.woff2') format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
}WOFF2 cuts the file to 58 percent of its size with Brotli compression and WOFF to 70 percent with zlib, and both are lossless, so the font renders exactly as before; WOFF2 is the one to serve. A TTF is refused because this font's glyphs are cubic PostScript curves and a TTF needs quadratic TrueType curves, a change that would alter the letter shapes. The CSS uses the family name and weight read from the font itself, so it can be pasted straight into a stylesheet next to the downloaded file.
Convert fonts between TTF, OTF, WOFF and WOFF2 in your browser, preview them with your own text, and copy a ready-made CSS @font-face rule. Every converted file is read back and loaded as a real font before you download it, and the tool tells you honestly when a conversion would change the glyph shapes.
Font files come in two layers. Inside is the font itself, the sfnt container that desktop systems install as a .ttf or .otf. For the web that container is usually wrapped: WOFF compresses each table with zlib, and WOFF2 uses Brotli compression plus a special encoding of TrueType glyph data, which typically makes it 30 to 50 percent smaller than the raw font. This tool moves a font between those wrappers without touching the glyphs, so the converted font looks exactly the same.
The file type is read from the file's own bytes, not its name, so a TTF that someone renamed to .woff is recognised as a TTF and the panel names the correct extension. The difference between TTF and OTF is the outlines inside, not the container: TrueType fonts store quadratic curves in a glyf table, while OpenType fonts with PostScript outlines store cubic curves in a CFF table. A font with TrueType outlines can be given a .otf name, and the tool says that this is only a rename. A font with CFF outlines cannot honestly become a .ttf without redrawing every curve, which changes the shapes; the tool explains this instead of producing a mislabelled file, and points to a font editor for that job.
Before a download is offered, the result is checked three ways: its container is read back from its own bytes, it is loaded by the browser as a real font, and for a TTF or OTF output every table checksum is verified. Nothing is offered unless the browser can load it. The panel shows the size before and after, so you can see how much a WOFF2 saves.
The preview shows the uploaded font at any size from 8 to 120 pixels with sample texts or your own, and the details panel lists the family, style, weight, glyph count, units per em and every table in the file. The CSS @font-face rule uses the font's real family name and weight, the right format() hint for the output and font-display: swap, ready to paste into a stylesheet.
Everything runs in your browser; fonts are never uploaded. Remember that converting a font does not change its licence: check that the licence of a commercial font allows web embedding before you put a WOFF2 of it on a website.
Turn a desktop TTF or OTF into a WOFF2 for your site and paste the @font-face rule into your CSS.
Unwrap a WOFF or WOFF2 back into a TTF or OTF that your operating system and design apps can install.
Find out what a downloaded file really is, which outlines it uses, and which extension it should have.
Compare a WOFF and a WOFF2 of the same font to see how many kilobytes the switch saves.
WOFF2. Every current browser supports it and it is the smallest. A WOFF fallback is only needed for very old browsers.
Because that OTF contains PostScript (CFF) outlines made of cubic curves, and a TTF needs TrueType quadratic curves. Converting means redrawing every glyph approximately, which changes the shapes. A font editor or a tool such as fontTools can do it; this tool only repackages fonts without altering them.
Yes. The .otf extension is allowed for fonts with TrueType outlines, and many foundries ship them that way. The tool tells you that only the name changes.
No. WOFF and WOFF2 are lossless wrappers, so the glyphs, spacing, kerning and other features are unchanged. The tool checks the result loads as a font before offering it.
No. Reading, converting and previewing all happen in your browser.
Technically yes, but the licence decides what you may do. Many commercial licences cover desktop use only and require a separate web licence for self-hosting.
Conversions run on your device in JavaScript. The values you enter are never sent over the network.