Typography Scale Generator

Build harmonic font-size scales for design systems—preview steps live, export CSS custom properties or design-token JSON, all client-side.

Runs in your browserType-scale math stays on your device—never uploaded.

Quick presets

Scale ladder

8 steps · ratio 1.25
-3

Ag

8.192px
-2

Ag

10.24px
-1

Ag

12.8px
base

Ag

16px
+1

Ag

20px
+2

Ag

25px
+3

Ag

31.25px
+4

Ag

39.063px

Live preview

Design systemsBuild a modular type scaleRatio-based steps from one base sizeThe quick brown fox jumps over the lazy dog. Export CSS variables, Tailwind theme extensions, or JSON tokens for your component library—preview hierarchy before you commit sizes in code.Caption · Updated May 2026 · 4 min read

Export

:root {
  --text-n3: 8.192px;
  --text-n2: 10.24px;
  --text-n1: 12.8px;
  --text-base: 16px;
  --text-1: 20px;
  --text-2: 25px;
  --text-3: 31.25px;
  --text-4: 39.063px;
}

/* Utilities */
.text-n3 { font-size: 8.192px; }
.text-n2 { font-size: 10.24px; }
.text-n1 { font-size: 12.8px; }
.text-base { font-size: 16px; }
.text-1 { font-size: 20px; }
.text-2 { font-size: 25px; }
.text-3 { font-size: 31.25px; }
.text-4 { font-size: 39.063px; }
By Muhammad Abdullah Rauf · Founder, EverydayTools.proUpdated 2026

What is a typography scale generator?

A typography scale generator builds a modular set of font sizes from one base size and a musical ratio (e.g. major third), then exports CSS variables or design tokens.

A modular typography scale multiplies a base font size by a fixed ratio at each step—like major third (1.25), perfect fourth (1.333), or golden ratio (1.618)—to produce harmonious heading and body sizes.

Design systems use scales so components do not invent one-off pixel values. Developers map steps to CSS custom properties (--text-base, --text-2) or JSON design tokens consumed by Tailwind or component libraries.

This tool runs entirely in your browser: pick base size (px or rem), choose a preset ratio or enter a custom multiplier, preview the ladder and a live hierarchy sample, then copy CSS variables or token JSON. Nothing is uploaded to EverydayTools servers.

Generate modular type scales with live preview and CSS/token export—browser-only, never uploaded.

Quick answers

Concise answers for common searches — definitions, steps, and comparisons.

Is my typography scale uploaded?

No. Scale math and export strings are computed in your browser. Font settings are never sent to EverydayTools servers.

Which ratio should I use for UI?

Major Third (1.25) is the most common web default—clear heading contrast without huge jumps. Use smaller ratios (minor third) for dense dashboards; larger ratios (perfect fourth, golden) for editorial and marketing.

rem or px for type tokens?

Prefer rem so type respects user font-size preferences and zoom. Use px when you need fixed alignment with raster assets.

Modular type scale math

Each step size = base × ratio^step. Negative steps shrink below base; positive steps grow for headings.

Formula

size(step) = baseSize × ratio^step

Assumptions

  • Linear ratio applied per step (not fluid viewport scaling unless you add clamp later)
  • Default web root is 16px when converting px display to rem

Limitations

  • Static steps do not replace fluid clamp() for viewport-responsive heroes
  • Rounded pixel values may differ slightly from design-tool decimal displays

How to use Typography Scale Generator

  1. Set base size and unit

    Enter your body font size (often 16px or 1rem) and choose px or rem for exported tokens.

  2. Pick a modular ratio

    Select a preset such as Major Third (1.25) or Perfect Fourth (1.333), or type a custom ratio between 1.05 and 1.8.

  3. Adjust step count

    Choose how many sizes to generate above and below the base so headings and captions are covered.

  4. Preview the ladder

    Review the scale list and live hierarchy preview (section title, body, caption) with your sizes applied.

  5. Export CSS or tokens

    Copy CSS custom properties with utility classes, or JSON design tokens for your design-system repo.

Typography Scale Generator examples

SaaS dashboard body + headings

Input

Base 16px · Major Third · 7 steps

Output

Caption ~12.8px through H1 ~39px with CSS variables

Balanced contrast for nav, cards, and page titles without oversized display type.

Marketing landing hero

Input

Base 18px · Perfect Fourth · 8 steps

Output

Stronger jumps between body and display sizes

More dramatic hierarchy for landing pages; pair largest step with clamp() if needed.

Design tokens handoff

Input

Base 1rem · export JSON

Output

{ "fontSize": { "base": "1rem", "2": "1.563rem", ... } }

Drop into tokens.json for Tailwind or Style Dictionary pipelines.

Who uses Typography Scale Generator?

Common real-world scenarios where this tool saves time.

Bootstrap a design system

Define --text-* CSS variables once so buttons, forms, and headings share the same modular sizes.

Audit inconsistent font sizes

Compare your ad-hoc pixel list against a ratio-based ladder to consolidate duplicate sizes.

Hand off to developers

Copy ready-to-paste CSS or JSON tokens instead of redlining arbitrary sizes in Figma.

Teach modular scale concepts

Preview how musical ratios change hierarchy before committing tokens in production code.

Workflow guides

Step-by-step chains that connect related tools for common tasks.

Design system token setup

  1. Pick base 16px or 1rem and Major Third ratio.
  2. Export CSS variables into your global stylesheet.
  3. Map components to --text-* tokens instead of raw pixels.

Marketing page hierarchy

  1. Try Perfect Fourth or Golden Ratio with a slightly larger base.
  2. Preview live hierarchy for H1–caption relationships.
  3. Combine largest sizes with clamp() for mobile-friendly heroes.

Reference tables

Common modular ratios

Ratio nameMultiplierBest for
Minor Third1.2Dense apps, tables, admin UIs
Major Third1.25General web apps and design systems
Perfect Fourth1.333Marketing pages, stronger heading contrast
Golden Ratio1.618Editorial, poster-like hierarchy

Static type scale vs fluid clamp()

ApproachBehaviorUse when
Modular scale (this tool)Fixed steps from base × ratioComponent tokens, body and heading sizes at breakpoints
CSS clamp()Smooth min–max between viewportsHero headlines and responsive display type

When to use Typography Scale Generator vs related tools

Related toolUse this tool whenUse related tool when
Spacing Scale AssistantYou need font-size tokens and hierarchy preview.You need padding, gap, and margin scales that align to the same design language.
CSS Clamp CalculatorYou want fixed modular steps for a design system.You need fluid min/preferred/max values between viewport widths.

Advertisement

Frequently Asked Questions

What is a modular type scale?

A modular type scale multiplies a base font size by a fixed ratio at each step so every size relates mathematically—avoiding random values like 13px, 17px, and 22px side by side.

Which ratio is best for websites?

Major Third (1.25) is the most common default for product UI. Perfect Fourth and Golden Ratio work well when you want bolder marketing or editorial contrast.

Should I use rem or px?

Use rem for accessibility—sizes scale with the user's root font size and zoom. Use px only when you need pixel-perfect alignment with fixed raster assets.

How many steps should I generate?

Most systems need 3–5 steps below base (captions, labels) and 3–5 above (h6–h1). Seven total steps around base is a practical starting point.

Can I export to Tailwind?

Copy the JSON design tokens and extend theme.fontSize in tailwind.config.js, or paste CSS variables and reference them with arbitrary values.

Does this replace fluid typography?

No. This tool outputs static modular steps. Use the CSS Clamp Calculator when you need viewport-responsive hero or display type with clamp()—the landing preview shows a suggested clamp for your largest step.

Can I use this as a responsive typography generator?

Yes for design-system foundations: export px, rem, or em tokens, then layer fluid clamp() on display sizes. Export formats include CSS, SCSS, Tailwind theme.fontSize, and JSON design tokens.

Privacy, accuracy, and trust

Privacy

Typography scale math runs in your browser—base sizes and ratios are never uploaded to EverydayTools.

Accuracy

Preview uses the same formula as export; verify in target browsers if you rely on sub-pixel rounding.

For design systems and prototyping—not a substitute for brand typography audits or accessibility certification.

Part of Design & UI Tools

More free tools for the same workflow.

Advertisement

Reviewed by EverydayTools Editorial Team on 2026-05-20.