Design and Social Media

How to Pair Fonts and Build a Type Scale for Your Website

Choose a heading and body font that work together, test them on real content, set a modular type scale and line length, and export ready-to-use CSS.

Saizul Amin
Saizul Amin2 Nov 2026 · 3 min read
How to Pair Fonts and Build a Type Scale for Your Website

How to Pair Fonts and Build a Type Scale for Your Website

Typography decides whether people read your website or leave it. Yet most font choices are made from a specimen of a single word, which says little about how a typeface behaves in a paragraph, a button or a dark-mode screen. This guide explains the principles of pairing fonts and sizing them, and shows how to test your choices on real content with the free Font Pairing and Typography Tester.

Contrast, not conflict

A good pairing combines two fonts that are clearly different in role but share some underlying quality. The classic approach pairs a serif heading with a sans-serif body, or the reverse. The difference in structure makes headings stand out, while similar proportions, such as a comparable x-height, keep the page coherent.

What rarely works is two fonts that are almost the same, such as two geometric sans-serifs, because the difference looks like a mistake. Two very expressive fonts also fight for attention. Let one font have personality and keep the other calm.

The pairing gallery offers eighteen combinations that follow these principles, each with a note on why it works. Use them as a starting point, then swap one font at a time and judge the effect.

Test with your own words

Lorem ipsum hides problems. Real text has long words, numbers, punctuation and the particular rhythm of your writing. Paste a real headline and two paragraphs into the content box. Then switch between the article, landing page and app layouts. A display font that looks stunning in a hero headline may become tiring in a long article, and a body font that reads well in paragraphs may look weak on a button.

Check dark mode as well. Thin weights that look elegant on white often break up on dark backgrounds, and you may need a heavier weight there.

Build a modular scale

Random heading sizes make a page feel unplanned. A modular scale fixes this by multiplying a base size by the same ratio at every step. With a 16 pixel base and a ratio of 1.25, the steps are 20, 25, 31.25 and so on. Small ratios like 1.125 give a quiet, dense hierarchy suited to apps and dashboards. Larger ratios like 1.333 or 1.5 create the dramatic contrast of magazines and landing pages.

The scale table lists every step in pixels and rem. Try a few ratios against your content; the right one makes headings distinct without dwarfing the text.

Line height and line length

Body text usually reads best with a line height between 1.4 and 1.7 times the font size. Headings need less, around 1.1 to 1.25, because large type with wide spacing looks disconnected. Line length matters just as much: aim for 45 to 75 characters per line. Longer lines make it hard to find the start of the next line, shorter ones break the reading rhythm. The measure slider sets the maximum paragraph width in characters so you can see the difference immediately.

Make headings fluid

A 52 pixel heading is impressive on a laptop and overwhelming on a phone. The fluid option writes headings with the CSS clamp function, which sets a minimum, a preferred size that grows with the screen width and a maximum. The result scales smoothly between devices without breakpoints.

Export and use the CSS

The CSS export includes the Google Fonts import for exactly the weights you chose, which keeps downloads small, custom properties for both font stacks and every step of the scale, and rules for body text, paragraphs and headings one to six. Paste it into your stylesheet or theme settings and adjust from there.

A note on privacy and performance

Fonts loaded from Google's servers reveal visitors' IP addresses to Google. If that matters for your audience, download the font files and host them yourself; the CSS structure stays the same. Use no more than two families and four weights in total, because every extra file slows the first page load.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages