BrowseFonts logo

Webfont CSS Generator

Upload a font, preview its lettering, and create ready-to-copy @font-face CSS for your website. Set font weight, style, loading behaviour and optional Unicode ranges. TTF, OTF, WOFF and WOFF2 sources are converted to a matched WOFF2 + WOFF pair on the server.

Font settings

Font from my favourites
To list your favourite fonts here, sign in. Log in or sign up free.
TTF, OTF, WOFF, WOFF2 · maximum 12 MB
Without the extension — .woff2 and .woff are added automatically. Use a path relative to the CSS file.
Only use ranges your font actually covers. Leave blank for no restriction.
Conversion runs on this server: TTF/OTF becomes WOFF2 + WOFF, a WOFF upload also gets a WOFF2 twin (and a WOFF2 upload a WOFF twin). Both files are written to fonts/ and the CSS lists both src URLs. Uploads are never stored after the download finishes.

Live font preview

The quick brown fox jumps over the lazy dog. 0123456789
Choose a font to preview it in your browser.

Generated @font-face CSS



			
WOFF2 — modern browsers WOFF — legacy fallback

HTML usage example


		

How to use a custom font on your website

Choose a TTF, OTF, WOFF or WOFF2 file and generate the matching @font-face declaration. Place your fonts on your own server in a fonts/ folder, update the URL in the generator, then copy the CSS into your stylesheet. Apply the new font-family to your headings, paragraphs or other elements.

WOFF2 and WOFF in one package

Download All builds a ZIP with fonts/your-font.woff2, fonts/your-font.woff, a ready fonts.css, a sample.html demo page and two shortcuts back to BrowseFonts and this webfont generator. Unzip it at the root of your site and the generated CSS already points at both files — modern browsers pick WOFF2, older ones fall back to WOFF.

Which font format should I use?

WOFF2 is generally the preferred webfont format for modern browsers because it usually produces smaller files. WOFF1 is a useful fallback. TTF and OTF can also be loaded by modern browsers, but are not typically the most efficient webfont delivery formats.

Does the font upload go to the server?

Font preview and CSS generation happen locally in your browser. When you convert or download the package, the selected font is sent to this page, converted in memory and streamed back inside the ZIP; it is not saved on the server.

What about font licensing?

Check the font's licence before using it on a website. A font being downloadable does not necessarily grant web embedding or commercial-use rights.