Google Fonts CSS Generator
Build a Google Fonts CSS2 URL with family names, weights, italics and a display strategy. Copy or download it with scoped CSS classes.
Build Google Fonts CSS2 for Two Families
Preview uses fonts available on this device. The generated import or link requests Google Fonts when used in a webpage.
A clear heading and body text
Google Fonts CSS Generator: how to use it
- Choose a project preset, select a popular family, or enter a family name. Add rows for additional families.
- Enter normal and italic weights as lists or ranges. Choose a display strategy, CSS fallback and class for each family.
- Review the URL and local preview. Copy the CSS import or HTML link, and use the classes in your own webpage.
Limits and notes
Builds CSS2 syntax for up to eight unique families. Supports the ital and wght axes and an optional text parameter up to 500 characters. The local preview uses the browser’s installed fonts and fallbacks.
How your privacy works →Google Fonts CSS Generator: common questions
How do I request a variable weight range?
Use two dots, such as 200..900. Check the published family for supported weights and styles. The generator sorts axis values and rejects overlapping ranges.
When will the generated URL contact Google Fonts?
The workspace shows the URL as text. A browser requests Google Fonts when you put the generated link or CSS import in an active page.
Which code do I use in a webpage?
Put the link in the HTML head or place the import at the start of your CSS. Apply the generated class rules to the elements you want to style.