Skip to typography scale generator

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.

By Muhammad Abdullah Rauf · Founder, EverydayTools.proUpdated 2026-06-02· Reviewed by EverydayTools Editorial Team

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.

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.

Tailwind theme extension

  1. Export with Tailwind format or JSON tokens.
  2. Paste into theme.extend.fontSize in tailwind.config.js.
  3. Use utilities like text-lg and text-3xl mapped to your modular steps.

Reference tables

Common modular ratios

Ratio nameMultiplierBest for
Minor Second1.067Dense UI, tight data tables, compact labels
Major Second1.125Compact apps with subtle heading jumps
Minor Third1.2Dashboards, admin panels, data-heavy interfaces
Major Third1.25General web apps and design systems (most common default)
Perfect Fourth1.333Marketing pages, stronger heading contrast
Augmented Fourth1.414Display headings, poster-like hero type
Perfect Fifth1.5Editorial layouts, magazine-style hierarchy
Golden Ratio1.618Bold editorial, brand-forward display type

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?

Yes. Choose the Tailwind export tab to copy a theme.fontSize block, or use JSON tokens and extend tailwind.config.js. CSS variables work with arbitrary values like text-[var(--text-lg)].

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.

What is the formula for a modular scale?

Each step size equals base × ratio^step. Negative steps shrink below the base (captions, labels); positive steps grow for headings. The tool applies the same math in preview and export.

What base size should I start with?

16px (1rem) is the web default and matches most browser root font sizes. Dashboards often use 14px; marketing pages sometimes use 18px for slightly larger body copy.

When should I use a smaller ratio like Minor Third?

Smaller ratios (1.2 or below) produce tighter jumps between sizes—ideal for dense admin UIs, tables, and interfaces where headings must stay compact.

When should I use Perfect Fourth or Golden Ratio?

Larger ratios create dramatic heading contrast. Use them on landing pages, editorial sites, and brand campaigns where display type needs to stand out from body copy.

Can I enter a custom ratio?

Yes. Open Advanced options and type any multiplier between 1.05 and 1.8. Useful when brand guidelines specify a non-standard ratio like 1.28.

What is the difference between px, rem, and em export?

px exports fixed pixel values. rem exports relative to the root font size (recommended for tokens). em exports relative to the parent element—handy for component-scoped typography.

How do I add the CSS export to my project?

Copy the :root block into your global stylesheet or design-token layer. Reference variables like var(--text-lg) in components instead of hard-coded pixel values.

How do I extend Tailwind with exported tokens?

Paste the Tailwind export into theme.extend.fontSize in tailwind.config.js, or map CSS variables with arbitrary values. Rebuild Tailwind so new sizes appear in utility classes.

What does the JSON tokens export contain?

A fontSize object keyed by step labels (base, sm, lg, etc.) with string values in your chosen unit. Drop it into tokens.json for Style Dictionary or similar pipelines.

What are steps below and steps above?

Steps below generate smaller sizes under the base (captions, fine print). Steps above generate larger sizes for headings. Adjust both in Advanced options to control how many tokens you export.

How does semantic mapping work?

The tool maps ladder steps to common roles—overline, caption, body, h6 through h1—based on step count. Fewer steps mean some roles share the same size; add steps to widen the hierarchy.

What do the readability checks mean?

They flag common issues such as body text below 16px equivalent or very large display sizes that may need line-height tuning. Pair results with the Contrast Checker for WCAG color validation.

Is my typography scale uploaded to a server?

No. All math and exports run in your browser. Settings autosave to localStorage on your device only—they are never sent to EverydayTools servers.

Does the tool work offline?

After the page loads, scale generation and export work without a network connection. Autosave uses localStorage on your device.

What preview scenes are available?

Article (long-form content), UI card (component-style layout), and Landing (marketing hero). Toggle light or dark backgrounds to judge contrast before shipping tokens.

What is the fluid clamp hint on the landing preview?

For marketing display type, the tool suggests a clamp() formula so the largest step scales smoothly between viewports. Copy it or refine values in the CSS Clamp Calculator.

How is this different from Figma type styles?

Figma styles are design-layer definitions. This tool outputs developer-ready CSS, SCSS, Tailwind, or JSON tokens from the same modular math—ideal for handoff to code.

Can I align typography with a spacing scale?

Yes. Generate type tokens here, then use the Spacing Scale Assistant for padding and gap tokens. Many teams share the same ratio (e.g. Major Third) across both scales.

What ratio do Material Design and Bootstrap use?

Material type scale uses distinct sizes rather than a single ratio multiplier. Bootstrap 5 defaults to a modular-ish scale near Major Second/Major Third. This tool lets you match or customize any approach.

Should headings use the same font as body text?

Often yes in product UI (one sans family). Editorial and marketing sites frequently pair a display face for headings with a readable body face—see Font pairing ideas in Advanced options.

How do I audit inconsistent font sizes in an existing product?

List your current pixel sizes, then generate a modular scale with a similar ratio. Compare which ad-hoc sizes can merge into token steps to reduce design debt.

What line-height should I pair with scale steps?

This tool exports font sizes only. A common rule: tighter line-height on large display type (1.1–1.2), relaxed on body (1.5–1.65). Set line-height separately in your design system.

Can I use em units for component libraries?

Yes. Export in em when typography should scale with a component's local font-size—useful for buttons, cards, or nested widgets where rem would ignore parent context.

Why do rounded px values differ slightly from my spreadsheet?

The tool rounds displayed px for readability while preserving precise rem/em values in export. Sub-pixel differences are normal—verify in target browsers if pixel-perfect match matters.

What keyboard shortcut copies the export?

Press Ctrl+Shift+C (Cmd+Shift+C on Mac) to copy the current export format to your clipboard without clicking the copy button.

How do workflow presets differ?

Design system (16px, Major Third), Dashboard (14px, Minor Third), Marketing (18px, Perfect Fourth), and Editorial (18px, Golden Ratio) set base, ratio, and step counts in one click.

Can I download the export as a file?

Yes. Use Download in the export panel to save type-scale.css, .scss, or .json depending on the selected format.

What is the golden ratio in typography?

The golden ratio (≈1.618) is a classic proportional relationship. As a type scale multiplier it produces bold jumps—best for editorial heroes, not dense application UI.

How do I reset to defaults?

Click Reset next to the workflow presets to restore base 16px, Major Third ratio, and default step counts. Clears custom ratio selections.

Does export include line-height?

Yes. Every format exports paired line-height tokens (--leading-* in CSS, lineHeight in JSON, and lineHeight in Tailwind fontSize tuples). Values are tuned by step size—tighter for display, relaxed for body.

What is Fluid CSS export?

Fluid CSS wraps each step in clamp() so type scales smoothly between 320px and 1280px viewports. Display steps get more viewport range; body and caption steps stay tighter. Pair with static CSS when you need fixed breakpoint tokens.

Can I share my scale with a teammate?

Click Share scale to copy a URL that restores base size, ratio, step counts, preview scene, and export format. Settings also autosave in your browser via localStorage.

What is the Full config Tailwind export?

A complete tailwind.config.js module with theme.extend.fontSize entries—including lineHeight—for every step. Paste into your project and adjust plugins or content paths as needed.

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-06-02.