Type scale generator

A modular type scale multiplies a base size by a fixed ratio for each step up and divides for each step down, which gives consistent hierarchy.

How to use the type scale generator

  1. Set the base size, usually 16px for body text.
  2. Choose a ratio.
  3. Review the preview and copy the CSS variables.

Choosing a ratio

Small ratios such as 1.125 or 1.2 suit dense interfaces and phones. Larger ratios such as 1.333 or 1.5 suit editorial and marketing pages.

Frequently asked questions

Why use rem?

rem sizes follow the user's root font size setting.

Should I round the sizes?

You can. Browsers render fractional sizes, so rounding is a design preference.

How many steps do I need?

Most products use four to six. Unused steps can be deleted from the output.

Related tools