Engineering Guides
Self-Hosting Google Fonts for GDPR Compliance & Zero Third-Party Requests
Eliminate external fonts.googleapis.com requests for European GDPR compliance by packing local WOFF2 fonts, @font-face CSS, and CLS fallbacks.
Quick Answer
Self-hosting fonts removes external connections to fonts.googleapis.com and fonts.gstatic.com that leak visitor IP addresses under GDPR rulings. Drop your downloaded Google Fonts ZIP or TTF/OTF weights into FontTo to emit compressed WOFF2 files, @font-face CSS, and Anti-CLS overrides in one local ZIP.
Why European sites are migrating away from Google Fonts CDN
German and EU court rulings established that loading stylesheets from fonts.googleapis.com automatically transmits visitor IP addresses to third-party servers without prior consent. Furthermore, modern browsers now partition HTTP caches by top-level site origin, eliminating the historical cross-site cache benefit of public CDNs.
Serving WOFF2 fonts directly from your own origin or CDN eliminates an extra DNS/TLS handshake, improves LCP consistency, and guarantees zero third-party font tracking.
Turn raw Google Fonts ZIPs into production WOFF2 bundles
Google Fonts downloads ship uncompressed .ttf static weights or variable fonts rather than .woff2. Simply drop the entire .zip archive (or individual .ttf files) into FontTo's Self-Host Google Fonts tool: it extracts every font inside browser memory, encodes WOFF2 with optional hinting removal, and writes unified @font-face CSS plus size-adjust fallbacks.
<link rel="preload" href="/fonts/inter-regular.woff2" as="font" type="font/woff2" crossorigin />
<link rel="stylesheet" href="/fonts/fonts.css" />Bonus optimization: subset and cache immutably
If your site only uses Latin Basic or a fixed language set, trim unused Cyrillic/Greek/Vietnamese blocks with Font Subsetter, then serve /fonts/*.woff2 with Cache-Control: public, max-age=31536000, immutable.
Open tool:Trim unused Unicode blocks from self-hosted fonts →
Frequently asked questions
Is self-hosting Google Fonts allowed under their licenses?
Yes. Fonts in the Google Fonts catalog use open-source licenses like SIL Open Font License (OFL) or Apache 2.0, which explicitly permit self-hosting and subsetting.
Is self-hosting faster than linking fonts.googleapis.com?
Almost always yes. Eliminating the extra DNS lookup, TLS handshake, and CSS waterfall lets browsers preload /fonts/*.woff2 immediately on the first HTML round-trip.
Why include crossorigin on local font preload tags?
The HTML spec requires the crossorigin attribute on font preloads even for same-origin URLs; omitting it causes browsers to fetch the font twice.
Authoritative References
Tools used in this guide
Related formats
Related Comparisons
More engineering guides
- Production @font-face CSS: Preload, crossorigin, and font-display StrategyWrite bulletproof @font-face CSS with font-display: swap vs optional, crossorigin preload hints, and metric-matched fallbacks for fast LCP.
- Zero Layout Shift Web Fonts: Calculating size-adjust & ascent-overrideEliminate Cumulative Layout Shift (CLS) on web font swap using exact OS/2 vs hhea formulas for size-adjust, ascent-override, and descent-override.
- Removing Font Hinting (fpgm/prep/cvt): Saving 8–15% Bytes on Retina ScreensStrip legacy TrueType bytecode hinting tables (fpgm, prep, cvt) with HarfBuzz WASM to save 8%–15% WOFF2 bytes for macOS, iOS, and modern HiDPI screens.