Type & Spacing Scale
Pick a base font size and ratio to get a harmonious size scale for headings and text with an Arabic and English preview, plus a spacing scale, exported as CSS, Tailwind or JSON.
Free, no sign-up
Your data stays on your device
Works offline after first open
The tool
Loading the tool…
How to use
- Enter the base text size (usually 16px) and choose a ratio.
- Set how many steps go up (headings) and down (small text).
- Check the preview, then copy or download the sizes as CSS variables, a Tailwind config or JSON.
- In the spacing tab, choose a base unit (4 or 8) to get a spacing scale.
Privacy & how it works
Processes your data in the browser and stores nothing.
- Engine: lightweight in-page code, no external libraries.
- Works offline after you open it once.
Frequently asked questions
How is the scale calculated?
Each step = base × ratio raised to the step number. With base 16 and ratio 1.25: step 1 = 20, step 2 = 25, and step −1 = 12.8.
Which ratio should I pick?
Small ratios (1.125–1.2) suit dense interfaces and apps; large ones (1.333–1.618) suit articles and marketing pages. Arabic typefaces often need a slightly larger base than Latin ones.
Why an 8px grid?
When every space is a multiple of one number (4 or 8), layouts look tidy and consistent, and designers and developers share the same values.
Formulas & sources
Related tools
CSS clamp() GeneratorEnter the smallest and largest size and the two screen widths to get a ready CSS clamp() for fluid type or spacing, with a value table and a full fluid type scale.CSS Units ConverterConvert between px, rem, em, %, vw, vh, pt, cm and more using your root font size and viewport, with a px-to-rem table and vw values on common screens.Golden Ratio CalculatorSplit any length by the golden ratio 1.618, scale it up or down, get a golden size sequence and a main/sidebar layout split for your page with ready CSS and a diagram.Grid CalculatorWork out column width in a layout grid from container width, column count, gutters and margins, with every span in px and %, a grid preview and ready CSS Grid code.