๐Ÿ“ Typography Scale Generator

Generate typography scales for perfect font sizing. Create harmonious font size scales with different ratios.

Heading 6
The quick brown fox jumps over the lazy dog
3.81rem
Heading 5
The quick brown fox jumps over the lazy dog
3.05rem
Heading 4

The quick brown fox jumps over the lazy dog

2.44rem
Heading 3

The quick brown fox jumps over the lazy dog

1.95rem
Heading 2

The quick brown fox jumps over the lazy dog

1.56rem
Heading 1

The quick brown fox jumps over the lazy dog

1.25rem
Base

The quick brown fox jumps over the lazy dog

1rem
Namepxremem
Small 210.2px0.64rem0.64em
Small 112.8px0.8rem0.8em
Base16px1rem1em
Heading 120px1.25rem1.25em
Heading 225px1.56rem1.56em
Heading 331.3px1.95rem1.95em
Heading 439.1px2.44rem2.44em
Heading 548.8px3.05rem3.05em
Heading 661px3.81rem3.81em
:root {
  --font-size-small-2: 0.64rem;
  --font-size-small-1: 0.8rem;
  --font-size-base: 1rem;
  --font-size-heading-1: 1.25rem;
  --font-size-heading-2: 1.56rem;
  --font-size-heading-3: 1.95rem;
  --font-size-heading-4: 2.44rem;
  --font-size-heading-5: 3.05rem;
  --font-size-heading-6: 3.81rem;
}

/* Usage */
h1 { font-size: var(--font-size-heading-6); }
h2 { font-size: var(--font-size-heading-5); }
h3 { font-size: var(--font-size-heading-4); }
h4 { font-size: var(--font-size-heading-3); }
h5 { font-size: var(--font-size-heading-2); }
h6 { font-size: var(--font-size-heading-1); }
p, body { font-size: var(--font-size-base); }

How to Build a Typography Scale

  1. Select the base size. 16px is a safe default for body text on the web.
  2. Choose a ratio (Major Third, Perfect Fourth, Golden Ratio, etc.) that matches your brand personality.
  3. Preview headings and body copy to ensure the hierarchy feels balanced.
  4. Copy the generated CSS variables and use them in your design system or Tailwind config.

Ratio Cheat Sheet

Subtle Scales

  • Major Second (1.125): Great for UI-heavy dashboards.
  • Minor Third (1.2): Balanced spacing for product copy.
  • Major Third (1.25): Popular choice for editorial layouts.

Expressive Scales

  • Perfect Fourth (1.333): Strong contrast between headings.
  • Golden Ratio (1.618): Dramatic hierarchy for marketing pages.
  • Octave (2): Use sparingly for hero/eyebrow text.

Tips for Better Type Scales

  • Limit yourself to 5โ€“7 steps in the scale to avoid overwhelming options.
  • Pair type scales with consistent line-height (1.2 for headings, 1.5 for body).
  • Use rem for font sizes so the scale respects the root font size.
  • Test responsive typography by adjusting the base size via CSS clamp() or media queries.