How to use the Type Scale Generator
- Set a base font size and pick a ratio.
- Choose how many steps above the base.
- Preview the scale and copy the CSS variables.
What does this tool do?
A modular scale multiplies a base size by the same ratio at every step, so headings and body text relate consistently. Small ratios (1.125–1.2) suit dense interfaces; larger ones (1.333–1.618) suit editorial layouts.
Sizes are exported as CSS custom properties in rem, so they respect users' browser font settings.
Why use it?
- Eight classic ratios.
- Live preview.
- CSS variables in rem or px.
Use cases
- Heading sizes for a website or design system.
- Consistent type in slide decks and documents.
- Matching type between design files and code.
16 px base, ratio 1.25 (major third)
Each step is the previous one × 1.25:
| Step | rem | px |
|---|---|---|
| Base | 1 | 16 |
| +1 | 1.25 | 20 |
| +2 | 1.563 | 25 |
| +3 | 1.953 | 31.25 |
| +4 | 2.441 | 39.06 |
| +5 | 3.052 | 48.83 |
Common mistakes
- A large ratio on a dense app UI, which makes headings huge.
- Using px for type, which ignores users' font settings.
- Too many steps — most sites need four to six sizes.
Privacy
The calculation happens instantly in your browser. The numbers you enter are not sent to our servers or saved. There's no account to create and nothing to install.
Frequently asked questions
Which ratio should I choose?
1.2–1.25 for apps and dashboards; 1.333 or more for blogs and marketing pages.
Why rem?
rem scales with the user's browser font size, which helps accessibility.
Can I use it with Tailwind?
Yes, map the CSS variables to font sizes in your theme.
Content last updated . See how M2Toolkit works.