Free @font-face CSS Generator for Custom Web Fonts
Upload your font files and generate @font-face CSS rules instantly
Drop your font files here
or click to browse from your computer
Supports: WOFF2, WOFF, TTF, OTF, EOT, SVG
Developer & Verifier

Developed by
Marcus Rodriguez
Lead Developer

Verified by
Sarah Mitchell
Product Designer, Font Specialist
What is @font-face CSS?
The @font-face CSS at-rule allows web developers to specify custom fonts to display text on their websites. Instead of being limited to web-safe fonts installed on users' computers, you can use any font by providing the font files and telling the browser how to use them.
A properly configured @font-face rule includes the font family name, source files with format hints, and optional properties like font-weight, font-style, and font-display for optimal loading behavior.
How to Use This Generator
Upload Your Fonts
Drag and drop or click to upload your font files. Supports WOFF2, WOFF, TTF, OTF, EOT, and SVG formats.
Customize Settings
Set the font family name, weight (100-900), style (normal/italic), and display property for each font.
Preview CSS Code
See the generated @font-face CSS rules in real-time as you adjust settings for your fonts.
Copy or Download
Copy the CSS to your clipboard or download as a fonts.css file ready to use in your project.
Features
Understanding font-display Values
| Value | Behavior | Best For |
|---|---|---|
| swap | Shows fallback immediately, swaps when loaded | Most websites (recommended) |
| block | Hides text briefly (~3s), then shows font or fallback | Icon fonts, critical branding |
| fallback | Short block (~100ms), swaps within ~3s or uses fallback | Balance between speed and consistency |
| optional | Very short block, only swaps if immediately available | Performance-critical pages |
| auto | Browser default (usually similar to block) | Legacy behavior |
