What Is the Typography Scale Generator?
Generate harmonious type scales using musical and mathematical ratios. Create consistent heading and body text hierarchies for web projects.
Why Use This Tool?
A typography scale defines the relative sizes of headings, body text, and small text using a consistent ratio. This creates visual harmony — the same principle that makes musical intervals sound pleasing.
How to Use This Typography Scale
- Set your base font size — Enter the base size for body text — 16px is the browser default and the most common starting point.
- Choose a scale ratio — Pick one of eight ratios, from Minor Second (1.067) to the Golden Ratio (1.618). Higher ratios create more dramatic size differences and shrink the caption steps fast.
- Preview the scale — See all generated sizes applied to sample headings and body text, from H1 down to small/caption text.
- Copy the values — Export the scale as CSS custom properties, a Tailwind v3 config, SCSS variables or a plain rem/px list.
Worked example: one base, six ratios
The tool computes each step as base × ration, from n = −2 (XS / Caption) to n = 6 (4XL / Display), rounded to 0.01 px, and exports rem at 16 px = 1rem. With a 16 px base:
| Ratio | XS (n = −2) | Base | H1 (n = 5) | Display (n = 6) |
|---|---|---|---|---|
| Major Second 1.125 | 12.64 | 16 | 28.83 | 32.44 |
| Minor Third 1.2 | 11.11 | 16 | 39.81 | 47.78 |
| Major Third 1.25 | 10.24 | 16 | 48.83 | 61.04 |
| Perfect Fourth 1.333 | 9.00 | 16 | 67.34 | 89.76 |
| Perfect Fifth 1.5 | 7.11 | 16 | 121.5 | 182.25 |
| Golden Ratio 1.618 | 6.11 | 16 | 177.42 | 287.07 |
- The small end breaks before the large end. Above 1.333 the caption step drops under 9 px (6.11 px at the golden ratio), which is too small for most text. Big ratios suit pages with few text sizes; if you use one, set captions by hand to 12 px or more rather than taking step −2.
- The large end decides mobile. A 1.333 H1 is 67 px, which leaves room for only a few words per line on a 375 px phone. Common practice is a smaller ratio on phones and a larger one on desktop, switched with a media query or interpolated with
clamp(). - Real systems are not one ratio. Tailwind's default sizes (12, 14, 16, 18, 20, 24, 30, 36, 48, 60, 72 px) step by 1.11 to 1.33 between neighbours: tight in the body range, wider for headings. Use the generated scale as a start and adjust individual steps.
- Keep the rem export. Rem sizes follow the reader's browser font-size setting; fixed px headings do not grow with it. WCAG 1.4.4 asks that text can be resized to 200% without losing content.
The ratio names come from musical intervals (a perfect fifth is a 3:2 frequency ratio) and were popularised for web type by Tim Brown's Modular Scale. They are a convenient vocabulary, not evidence that a ratio reads better.
Sources
Checked on .
Related tools
- Once you have a scale, the Optical Size Adjuster ensures the fallback font renders at the same visual size as the primary so the scale holds during font load.
- Pair the scale with the Vertical Rhythm Calculator to snap each generated size to a baseline-aligned line-height and margin.
- Scale alone is not enough; tracking should vary with both size and weight. The Letter-Spacing Optimizer generates a per-size, per-weight tracking matrix.
- For ordered lists that match the rest of the type system, the CSS Counter Style Generator builds custom markers (Roman, Greek, symbols) that integrate with your scale.
- The first letter of a long-form article is one of the most powerful design moments. The Drop Cap Generator builds drop caps sized in lines of your body text, with a ::first-letter fallback.
- Shadow intensity should vary with size. The Text Shadow Designer builds layered shadows you can keep heavy on headlines and subtle on body text.
Frequently Asked Questions
Built by Derek Giordano · Part of Ultimate Design Tools