Paste a Google Fonts URL or name and get a self-hosted @font-face CSS block plus a curl script for downloading every WOFF2. Privacy-friendly, GDPR-safe.
Paste a fonts.googleapis.com URL or a family name
We fetch the CSS from Google Fonts API v2 with display=swap
Get a self-hosted CSS block (with rewritten relative paths) plus a curl script for the WOFF2 files
0 bytes uploaded. Google Fonts → Self-Hosted CSS Generator runs entirely in your browser using opentype.js and the File API. Your fonts never leave your device.
This tool requires the Free plan or higher.
GDPR compliance (no IP leakage to Google), faster TTFB on a single CDN, fewer DNS lookups, and better Core Web Vitals scores.
Browser CORS policies block fetching gstatic.com WOFF2 files for in-browser ZIP packaging. The curl script runs once on your build server or laptop to grab them — far more reliable than a brittle proxy.
Yes. The CSS API serves variable variants automatically when you request multiple weights — the generated @font-face block uses font-weight ranges (e.g., 100 900) for variable families.
Build a complete @font-face declaration with WOFF2/WOFF/TTF fallbacks, font-display, unicode-range, and proper format() hints. Copy-paste ready.
Open toolGenerate the right <link rel="preload"> tags for above-the-fold web fonts. Cuts LCP by 100–500 ms by starting the font fetch alongside the HTML parse.
Open toolDecide between auto, block, swap, fallback, and optional. Get an explanation of each value's behaviour, recommended use cases, and copy-paste @font-face CSS.
Open tool