About Type Scale Generator
A modular type scale gives every font size in a design a fixed relationship: each step is the one below it multiplied by the same ratio. Pick a base size, usually your body text, and a ratio from a minor second (subtle) to the golden ratio (dramatic), or enter your own.
The preview draws your own text at every step, largest first, so you can judge the contrast between headings and body text. Copy the result as CSS custom properties, SCSS variables or JSON design tokens, in rem or px.
How it works
- Step n is the base size multiplied by the ratio to the power n, so step 1 is base × ratio and step −1 is base ÷ ratio.
- The named ratios are exact: a major third is 5 ÷ 4, a perfect fourth 4 ÷ 3, an augmented fourth √2 and the golden ratio (1 + √5) ÷ 2.
- Sizes are divided by the root font size for rem and rounded to four decimals, or to two decimals in px.
Questions
Which ratio should I choose?
Smaller ratios (1.125 to 1.2) suit dense interfaces and long documents with many heading levels. Larger ones (1.333 to 1.618) suit marketing pages with a few big headings. A common middle ground is the major third, 1.25.
How do I map steps to headings?
A typical mapping is step 0 for body text, steps 1 to 5 for h4 up to h1, and steps −1 and −2 for small print and captions. Generate as many steps as you have levels.
Can the scale change with the screen size?
This tool makes one fixed scale. To make a step fluid, generate a scale for small screens and one for large screens, then turn each pair into a clamp() value with the CSS clamp generator.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.