Typographic Scale Generator

Harmonious font size scales for design systems

Ad placeholder (leaderboard)

The Typographic Scale Generator builds a harmonious set of font sizes from one base size and a musical ratio, then exports them as CSS custom properties or design-token JSON. Using a consistent ratio gives your headings and body text a deliberate, professional rhythm.

How it works

Each named step sits a fixed number of positions from the base. Its size is the base multiplied by the ratio raised to that distance — positive for larger steps, negative for smaller ones:

size(step) = base × ratio^(stepIndex − baseIndex)
rem        = size / 16
steps      = xs, sm, base, lg, xl, 2xl, 3xl, 4xl   (base in the middle)

For example, with a 16px base and a major-third ratio of 1.25, the lg step is 16 × 1.25 = 20px and the xl step is 16 × 1.25² = 25px, while sm is 16 ÷ 1.25 = 12.8px.

Tips and notes

Pick the ratio to match the density of your design: editorial and app UIs read well at 1.2 to 1.25, while landing pages benefit from 1.333 or higher for bold hierarchy. Because the values are emitted in rem, they honour the user’s browser font size and stay accessible. Drop the CSS variables into your global stylesheet and reference var(--text-xl), or feed the JSON into your token pipeline so the same scale drives both design and code.

Ad placeholder (rectangle)