Typography Scale

Generate harmonious type scales with Google Fonts integration and live preview.

Settings
Generated Code
/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

/* HTML <link> alternative (faster) */
/* <link rel="preconnect" href="https://fonts.googleapis.com"> */
/* <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> */
/* <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet"> */

/* Usage */
body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0em;
}
:root {
  /* Typography Scale — Major Third (1.25) */
  --font-family: 'Inter', sans-serif;
  --line-height: 1.5;
  --letter-spacing: 0em;

  --text-xs: 0.640rem;    /* 10.24px */
  --text-sm: 0.800rem;    /* 12.80px */
  --text-base: 1.000rem;  /* 16.00px */
  --text-lg: 1.250rem;    /* 20.00px */
  --text-xl: 1.563rem;    /* 25.00px */
  --text-2xl: 1.953rem;   /* 31.25px */
  --text-3xl: 2.441rem;   /* 39.06px */
  --text-4xl: 3.052rem;   /* 48.83px */
}

/* Tailwind-compatible classes */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
Typography Preview
Using: Inter
xs
The quick brown fox jumps over the lazy dog
10.24px
sm
The quick brown fox jumps over the lazy dog
12.80px
base
The quick brown fox jumps over the lazy dog
16.00px
lg
The quick brown fox jumps over the lazy dog
20.00px
xl
The quick brown fox jumps over the lazy dog
25.00px
2xl
The quick brown fox jumps over the lazy dog
31.25px
3xl
The quick brown fox jumps over the lazy dog
39.06px
4xl
The quick brown fox jumps over the lazy dog
48.83px
Weight Preview
Inter — selected weights
400

The quick brown fox jumps over the lazy dog

700

The quick brown fox jumps over the lazy dog