← All tools
Generator

Type Scale Generator

Set a base size and a ratio to get every heading and text size. Preview with real fonts, then copy CSS, Tailwind or fluid clamp() code.

h161.04px / 3.815rem, line height 1.1

Design with a clear hierarchy

h248.83px / 3.052rem, line height 1.1

Design with a clear hierarchy

h339.06px / 2.441rem, line height 1.2

Design with a clear hierarchy

h431.25px / 1.953rem, line height 1.3

Design with a clear hierarchy

h525px / 1.563rem, line height 1.3

Design with a clear hierarchy

h620px / 1.25rem, line height 1.4

Design with a clear hierarchy

body16px / 1rem, line height 1.5

A type scale gives every size a reason. Start from a readable body size and let the ratio do the rest.

small12.8px / 0.8rem, line height 1.6

A type scale gives every size a reason. Start from a readable body size and let the ratio do the rest.

caption10.24px / 0.64rem, line height 1.6

A type scale gives every size a reason. Start from a readable body size and let the ratio do the rest.

Export
:root {
  --font-heading: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;

  --fs-h1: 3.815rem;
  --fs-h2: 3.052rem;
  --fs-h3: 2.441rem;
  --fs-h4: 1.953rem;
  --fs-h5: 1.563rem;
  --fs-h6: 1.25rem;
  --fs-body: 1rem;
  --fs-small: 0.8rem;
  --fs-caption: 0.64rem;

  --lh-h1: 1.1;
  --lh-h2: 1.1;
  --lh-h3: 1.2;
  --lh-h4: 1.3;
  --lh-h5: 1.3;
  --lh-h6: 1.4;
  --lh-body: 1.5;
  --lh-small: 1.6;
  --lh-caption: 1.6;
}

How a type scale works

A type scale picks one base size, usually the body text, and one ratio. Each step up multiplies the size by the ratio and each step down divides by it. At a 16px base and a 1.25 ratio, step 1 is 20px, step 2 is 25px and step 3 is 31.25px. Going down, step -1 is 12.8px.

This tool names the steps for you. Step 0 is body, steps above it are h6 up to h1, and steps below it are small, caption and so on. If you add more than six steps up, the extra sizes become display-1 and larger, for oversized hero text.

Line height gets tighter as text gets larger. Small text reads best at 1.5 to 1.6, large headings at 1.1 to 1.2. The suggestion for each step follows that rule, and body text never goes below 1.5.

How to pick a ratio

A small ratio gives sizes that sit close together, which suits interfaces with lots of labels. A large ratio gives strong contrast between headline and body, but the top steps grow quickly. The last column shows how big step 6 gets from a 16px base.

RatioValueStep 6Good for
Minor second1.06723.6pxDense interfaces, small screens and data tables.
Major second1.12532.4pxApps and dashboards that need gentle hierarchy.
Minor third1.247.8pxProduct UI and documentation with several heading levels.
Major third1.2561pxA solid default for marketing sites and blogs.
Perfect fourth1.33389.8pxEditorial pages and landing pages with clear contrast.
Augmented fourth1.414127.9pxBold headlines on pages with little body text.
Perfect fifth1.5182.3pxPosters, hero sections and short punchy pages.
Golden ratio1.618287.1pxDisplay-heavy layouts. Large steps get huge fast.

If a ratio feels too big, keep the base size and lower the number of steps up instead of switching ratios. Most pages use four or five heading sizes, not ten.

Using the export

The selected Google Fonts load from Google's css2 API with display=swap. Add the same families to your own site with the link Google generates, or self-host them.

Need typefaces? Browse the best Google Fonts or see tested Google font pairings. To fill the layout while you test sizes, use the lorem ipsum generator.

Type scale FAQ

What is a type scale?

A type scale is a set of font sizes where each size is the previous one multiplied by a fixed ratio. With a 16px base and a ratio of 1.25 the sizes run 16, 20, 25, 31.25 and so on. Because every size comes from the same rule, headings, body text and captions look related.

Which ratio should I use?

Use a small ratio such as 1.125 to 1.2 for apps, dashboards and long reading, where many sizes sit close together. Use 1.25 to 1.333 for most websites. Use 1.5 or 1.618 only when you want dramatic headlines, since each step up is a large jump.

What base font size should I start with?

16px is the browser default and a safe body size. Choose 17 or 18px for long articles and 14px for dense interfaces. Keep body text at 16px or above on phones so it stays readable without zooming.

Should I use px or rem for font sizes?

Use rem. A rem is relative to the browser's root font size, so people who raise their default text size get larger text. Pixel values ignore that setting. This tool assumes a 16px root, so 1.25rem is 20px.

What does the fluid clamp() option do?

It makes each size grow smoothly with the viewport. You set a minimum and maximum viewport width and a smaller base size for narrow screens. Each step becomes a clamp() value that stays at its minimum on phones, at its maximum on wide screens, and scales linearly in between.

Can I share my type scale?

Yes. The page address updates as you change the settings, for example ?base=16&ratio=1.25&steps=6&h=Montserrat&b=Lato. Press Copy link to copy it. Anyone who opens it sees the same scale and fonts.

Design with type that works

Zaps templates come with fonts already paired. Swap in your words and photos and post.