Good typography is mostly a matter of a few consistent decisions: a type scale, comfortable line length and line height, and font sizes that adapt to the screen without a stack of media queries. The typography tools here help you make those decisions and turn them into CSS.

The Fluid Typography and clamp() generators calculate font sizes (and spacing) that grow smoothly between a minimum and maximum viewport width. Line Height and Letter Spacing tools let you tune readability for body text and tighten large headings. For choosing typefaces, Font Pairing previews heading and body combinations, Font Preview lets you test any Google Font with your own text, and the Google Fonts Generator builds the import code for several families and weights at once.

Guide

Typography defaults that work for most sites

1

Set body text between 16px and 18px (1rem–1.125rem) and use rem units so user font settings are respected.

2

Use a line height around 1.5–1.7 for body text and 1.1–1.25 for large headings.

3

Keep line length near 60–75 characters with max-width: 65ch on text containers.

4

Generate heading sizes with clamp() so they scale with the viewport instead of jumping at breakpoints.

5

Load only the font weights you actually use, and add display=swap to Google Fonts URLs.

FAQ

Frequently asked questions

What does clamp() do for font sizes?

clamp(min, preferred, max) picks the preferred value — usually based on viewport width — but never goes below the minimum or above the maximum. It gives fluid type with two hard limits and no media queries.

Should font sizes be in px or rem?

Use rem for font sizes. It scales with the user’s browser font setting, which matters for accessibility, while px ignores it.

How many fonts should a site use?

Usually two at most: one for headings and one for body text, or a single variable font for both. Each additional family and weight adds download time.