CSS @font-face Generator
Generate CSS @font-face rules for self-hosted web fonts with all browser formats.
Font Settings
Font URLs
CSS Output
CSS @font-face Generator — self-host any web font
The CSS @font-face rule lets you serve custom fonts directly from your own server, avoiding third-party requests to Google Fonts or Adobe Fonts. WOFF2 is the most efficient format and is supported by all modern browsers — include WOFF as a fallback for older browsers. Set font-display: swap to render text immediately with a system fallback while the custom font loads, preventing invisible text (FOIT). Use unicode-range to subset the font to only the characters you need, reducing download size. For variable fonts (a single file supporting all weights), set font-weight: 100 900.
Private & free — this tool runs entirely in your browser.
Recommended: Kinsta — Fast managed hosting — up to $500 + 10% recurring.affiliate
Related Design & CSS tools
Color Converter
Convert a color to HEX, RGB, HSL, HSB, and CMYK at once.
HEX to RGB
Convert HEX color codes to RGB / RGBA values.
RGB to HEX
Convert RGB values into HEX color codes.
CSS Box Shadow Generator
Visually design CSS box-shadow with a live preview and code.
CSS Border Radius Generator
Visually craft border-radius with a live preview.
HEX to CMYK
Convert HEX colors to CMYK print values.
CMYK to HEX
Convert CMYK print values to HEX colors.
HEX to HSB
Convert HEX colors to HSB / HSV values.