Type Scale Generator

Build a modular typographic scale and copy the CSS.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

Type scale generator

This tool builds a modular typographic scale — a harmonious set of font sizes — from a base size and a ratio, and gives you copy-ready CSS. It is for designers and front-end developers who want consistent, mathematically related heading and body sizes instead of arbitrary values.

How it works

Starting from your base size (typically 16px) and a chosen ratio, the tool raises the ratio to each step’s power and multiplies by the base. It generates six steps, from 0 (the base) up to 5, and expresses each in both pixels and rem (dividing px by 16, the conventional root size):

size at step n = base × ratio^n
rem            = px ÷ 16

Ratios are the classic modular intervals — minor second (1.067) through to the golden ratio (1.618). The output is a set of CSS custom properties you paste into :root.

Example

With a base of 16px and the major third (1.25) ratio:

Steppxrem
0161.0
1201.25
2251.563
331.251.953

Step 1 is 16 × 1.25 = 20px (1.25rem); step 2 is 16 × 1.25² = 25px. The generated CSS reads --step-1: 1.25rem; /* 20px */ and so on, ready to drop in.

A consistent scale keeps headings, body text and captions visually balanced — generated instantly and privately in your browser.

Ad placeholder (rectangle)