Start a project

Tool 13 of 29 · Typography

Font Pairing Previewer

Try tested heading and body font pairs with your own words and sizes, then copy CSS for hosting the fonts on your own site, with no third-party requests.

Font Pairing Previewer

Pairings

Preview

Your CSS

CSS with self-hosted @font-face

Download the .woff2 files from Google Fonts or Fontsource (all free under the SIL Open Font License) and put them in a /fonts folder on your own site.

01

What it does

Try nine heading and body font pairs with your own words, then copy @font-face CSS for self-hosting.

  • Nine tested pairs, including two system font stacks
  • Your own heading and body text
  • Size, line height and weight controls
  • Dark and light previews

02

Private by design

Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

03

What you get

CSS, with a Copy and a Download button on every result.

  • Typography
  • Self-hosted fonts
  • GDPR

Why it matters

Typography sets the tone of a site before anyone reads a word, and pairing a characterful heading font with a calm body font is the quickest way to look professional. Seeing pairs with your own words is far more useful than a specimen sheet.

Where the fonts come from matters too. Loading them from a third-party font service sends every visitor's IP address to that company; in January 2022 a court in Munich ruled that doing so without consent breached GDPR. Hosting the files yourself avoids that and is usually faster. Every font here is open source and served from leej.uk, and the CSS is written for self-hosting.

How to use it

  1. Choose a pairing.
  2. Type your own heading and body text.
  3. Adjust the sizes, line height, weight and background.
  4. Copy the CSS, download the fonts from Google Fonts or Fontsource, and put them in your site's /fonts folder.

FAQ

Can I use these fonts on a client site?

Yes. All of them use the SIL Open Font License, which allows commercial use and self-hosting. You can't sell the font files on their own.

Why self-host fonts?

No visitor data goes to a third party, you control caching, and the browser doesn't need to connect to another server before showing text.

What does font-display: swap do?

It shows text straight away in a fallback font, then swaps in the web font when it has loaded, so nobody stares at a blank page.

Why are the system font pairs there?

System fonts load instantly because they're already on the device. They're a great choice for apps, dashboards and fast, plain sites.

Credits and licences

Preview fonts are self-hosted on leej.uk under the SIL Open Font License 1.1 (licence and copyright notices): DM Sans, DM Serif Display, Fraunces, Inter, Lora, Merriweather, Montserrat, Playfair Display, Source Sans 3 and Space Grotesk, each © its authors. No request is made to Google Fonts or any other font service.

Work with me

Want a site that gets these right?

I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

All developer tools · Back to leej.uk