Zero Signup ToolsFree browser tools

Generator Tools

Type Scale Generator

Generate a modular typographic scale from a base size and ratio. Live preview, CSS variables, Tailwind config, and JSON tokens for h1 to caption.

Configure scale

Base size, ratio, and number of steps

Browser default is 16. Accepted range: 8 to 32 px.

Accepted range: 1.01 to 3. Each step multiplies the previous size by this number.

Matches preset: Major Third (Marketing pages).

Quick ratios

Each step grows by the scale ratio.

Captions, footnotes, and meta text.

Edit to test the ladder with brand copy, product names, or actual headings.

Live preview

9 steps rendered at the actual ratio. Largest at the top.

16 px x 1.25
h161 px / 3.8147 rem

The quick brown fox jumps over the lazy dog

h248.8 px / 3.0518 rem

The quick brown fox jumps over the lazy dog

h339.1 px / 2.4414 rem

The quick brown fox jumps over the lazy dog

h431.3 px / 1.9531 rem

The quick brown fox jumps over the lazy dog

h525 px / 1.5625 rem

The quick brown fox jumps over the lazy dog

h620 px / 1.25 rem

The quick brown fox jumps over the lazy dog

base16 px / 1 rem

The quick brown fox jumps over the lazy dog

sm12.8 px / 0.8 rem

The quick brown fox jumps over the lazy dog

xs10.2 px / 0.64 rem

The quick brown fox jumps over the lazy dog

Export

Copy the scale into your codebase or design tokens.

:root custom properties

:root {
  --fs-h1: 3.8147rem;
  --fs-h2: 3.0518rem;
  --fs-h3: 2.4414rem;
  --fs-h4: 1.9531rem;
  --fs-h5: 1.5625rem;
  --fs-h6: 1.25rem;
  --fs-base: 1rem;
  --fs-sm: 0.8rem;
  --fs-xs: 0.64rem;
}

Scale table

Every step with px, rem, recommended line height, and a quick copy.

NameCSS variablePixelsRemLine heightCopy
h1--fs-h161 px3.8147 rem1.1
h2--fs-h248.8 px3.0518 rem1.1
h3--fs-h339.1 px2.4414 rem1.15
h4--fs-h431.3 px1.9531 rem1.25
h5--fs-h525 px1.5625 rem1.25
h6--fs-h620 px1.25 rem1.4
base--fs-base16 px1 rem1.5
sm--fs-sm12.8 px0.8 rem1.55
xs--fs-xs10.2 px0.64 rem1.55

Picking a ratio

Tighter ratios (1.067 to 1.2) work well for dense product UIs where many sizes need to coexist on the same screen without one element dominating. Pick 1.125 or 1.2 for dashboards, tables, and form-heavy apps.

Mid-range ratios (1.25 to 1.414) are the everyday default for marketing sites, blogs, and product pages where the heading hierarchy should be obvious but not theatrical. Perfect Fourth (1.333) is a popular brand default.

Wide ratios (1.5 to 1.618) give bold, editorial contrast. Reserve them for hero pages, landing pages, and case studies where one headline carries the page.

The Octave (2.0) doubles size at each step and is rarely used past two steps; treat it as a hero-only ladder. Designers often pair a wide ratio above the base with a tighter one below to keep small text readable.

How to use

  1. Set the Base font size in pixels (default 16) using the input or one of the preset chips (14, 16, 18, 20).
  2. Pick a scale ratio from the named presets (Perfect Fourth, Golden Ratio, and so on) or type any value between 1.01 and 3 to match a design spec.
  3. Choose how many steps you want above and below the base. The preview labels the steps with editorial names (h6 to display) above the base and (sm, xs, 2xs) below.
  4. Edit the sample text to render the ladder with your own copy. The preview uses the exact px size, line-height, and weight the export will produce.
  5. Switch the Export panel between CSS variables, Tailwind config, JSON tokens, and a plain px/rem table, then click Copy output to take it into your codebase.

About this tool

Type Scale Generator builds a modular typographic ladder from a base font size and a scale ratio, the same approach Robert Bringhurst describes in The Elements of Typographic Style and that designers know as a modular scale. Pick a base size between 8 and 32 px (16 px is the browser default), then pick a ratio: Minor Second (1.067), Major Second (1.125), Minor Third (1.2), Major Third (1.25), Perfect Fourth (1.333), Augmented Fourth (1.414, the sqrt-2 paper ratio), Perfect Fifth (1.5), Golden Ratio (1.618), Major Sixth (1.667), or Octave (2.0). Custom ratios between 1.01 and 3 are also accepted. Set how many steps you want above the base (named h6, h5, h4, h3, h2, h1, display, display-xl) and below the base (sm, xs, 2xs, and so on), up to eight steps in each direction. Each step is base * ratio raised to the step index, expressed in both px and rem against your chosen base. The tool also reports a sensible line-height for every step: tighter for display sizes, comfortable for body text, slightly open for the smallest captions. The live preview ladder renders every step with your own sample copy at the exact size and line-height the export will produce, so the visual hierarchy you see is the one you ship. Four copy-ready exports cover the common downstream cases: a CSS custom-properties block (:root variables keyed by --fs-h1, --fs-base, --fs-sm) for vanilla CSS or any framework that consumes design tokens; a Tailwind v3+ theme.extend.fontSize config that pairs each utility name with a [size, lineHeight] tuple; a JSON tokens object for Style Dictionary, Figma Tokens, or a design-token pipeline; and a plain px-and-rem table for documentation or a spec sheet. Useful for kicking off a design system, auditing whether your existing scale follows a real ratio, exporting tokens for engineers, or just picking a coherent ladder of headings for a new site or marketing page. Everything runs locally in your browser. The numbers and sample text you type here never leave your device.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsGenerator Tools