Skip to content
Tools/Design Tools
📐

Typography Scale Generator

Calculate mathematical type scales for design systems.

Base Font Size16px
text-5xl61.04px (3.815rem)
Intuitive interfaces built with design systems.
text-4xl48.83px (3.052rem)
Intuitive interfaces built with design systems.
text-3xl39.06px (2.441rem)
Intuitive interfaces built with design systems.
text-2xl31.25px (1.953rem)
Intuitive interfaces built with design systems.
text-xl25px (1.563rem)
Intuitive interfaces built with design systems.
text-lg20px (1.25rem)
Intuitive interfaces built with design systems.
text-base (Body)16px (1rem)
Intuitive interfaces built with design systems.
text-sm12.8px (0.8rem)
Intuitive interfaces built with design systems.
text-xs10.24px (0.64rem)
Intuitive interfaces built with design systems.
Generated Code Output
/* CSS Variables */
:root {
  --font-size-text-xs: 0.64rem; /* 10.24px */
  --font-size-text-sm: 0.8rem; /* 12.8px */
  --font-size-text-base: 1rem; /* 16px */
  --font-size-text-lg: 1.25rem; /* 20px */
  --font-size-text-xl: 1.563rem; /* 25px */
  --font-size-text-2xl: 1.953rem; /* 31.25px */
  --font-size-text-3xl: 2.441rem; /* 39.06px */
  --font-size-text-4xl: 3.052rem; /* 48.83px */
  --font-size-text-5xl: 3.815rem; /* 61.04px */
}

/* Tailwind Config */
fontSize: {
  'xs': ['0.64rem', { lineHeight: '1.2' }],
  'sm': ['0.8rem', { lineHeight: '1.2' }],
  'base': ['1rem', { lineHeight: '1.2' }],
  'lg': ['1.25rem', { lineHeight: '1.2' }],
  'xl': ['1.563rem', { lineHeight: '1.2' }],
  '2xl': ['1.953rem', { lineHeight: '1.2' }],
  '3xl': ['2.441rem', { lineHeight: '1.2' }],
  '4xl': ['3.052rem', { lineHeight: '1.2' }],
  '5xl': ['3.815rem', { lineHeight: '1.2' }],
}

✨ Tool Features

  • Popular typographic ratio presets (1.125 to 1.618)
  • Custom base size (px / rem)
  • Visual hierarchy comparison preview
  • Export CSS variables and Tailwind fontSize config

💡 How to Use

  1. 1Enter your base body font size (e.g. 16px).
  2. 2Select a musical scale ratio (e.g., Major Third 1.250).
  3. 3Inspect the generated steps from `h1` down to `caption`.
  4. 4Copy the CSS variables or Tailwind theme configuration.