📏 Font Size Scale Generator

Create harmonious type scales with modular ratios. Live preview & CSS code

Version 1.0.0 – Updated April 2025
?
The font size for body text. All other sizes are derived from this.
?
Multiplier for each step. Common ratios: 1.25 (major third), 1.333 (perfect fourth), 1.5 (perfect fifth).
?
How many heading sizes above the base (H6 to H1). Also one size below (small).

👁️ Live Preview

📋 CSS Code

:root { --base-font-size: 16px; } body { font-size: var(--base-font-size); color: #2c3e50; } h1 { font-size: 2.5rem; } h2 { font-size: 2rem; } h3 { font-size: 1.6rem; } h4 { font-size: 1.28rem; } h5 { font-size: 1.024rem; } h6 { font-size: 1rem; } small { font-size: 0.8rem; }

Embed This Tool

Want to embed this font size scale generator on your website? Use this code:

<iframe src="https://yoursite.com/font-size-scale-generator" width="100%" height="600" frameborder="0"></iframe>

📘 Modular Scale Examples

📐 Perfect Fourth (1.333)

:root { --base: 16px; } body { font-size: var(--base); } h1 { font-size: 4.209rem; } h2 { font-size: 3.157rem; } h3 { font-size: 2.369rem; } h4 { font-size: 1.777rem; } h5 { font-size: 1.333rem; } h6 { font-size: 1rem; }

🎵 Major Third (1.25)

h1 { font-size: 3.052rem; } h2 { font-size: 2.441rem; } h3 { font-size: 1.953rem; } h4 { font-size: 1.563rem; } h5 { font-size: 1.25rem; } h6 { font-size: 1rem; }

✨ Golden Ratio (1.618)

h1 { font-size: 6.854rem; } h2 { font-size: 4.236rem; } h3 { font-size: 2.618rem; } h4 { font-size: 1.618rem; } h5 { font-size: 1rem; }

📱 Minor Second (1.125)

h1 { font-size: 2.027rem; } h2 { font-size: 1.802rem; } h3 { font-size: 1.602rem; } h4 { font-size: 1.424rem; } h5 { font-size: 1.266rem; } h6 { font-size: 1.125rem; }

📖 Modular Scale Tutorials

📏

What is a Modular Scale?

Learn how ratios create harmonious proportions in typography.

Read Tutorial →
🎵

Musical Ratios in Web Design

How intervals like perfect fourths and fifths translate to the web.

Read Tutorial →
📐

Choosing the Right Ratio

Factors to consider: content, screen size, and brand personality.

Read Tutorial →

⚖️ Font Scale Tools Comparison

Feature Our Tool Tool A Tool B
Free & unlimited ❌ (limit)
Live preview with all headings
6 modular ratios
Adjustable number of steps ✅ (3‑6)
Multiple unit options (rem, px, em)
Color picker for preview text
Download CSS file
Client-side / private

❓ Frequently Asked Questions

What is a modular scale?

A modular scale is a sequence of numbers that relate to each other by a ratio. In typography, it creates consistent, harmonious font sizes for headings and body text.

How do I choose the right ratio?

Smaller ratios (1.125–1.25) create subtle, conservative scales. Larger ratios (1.333–1.618) create dramatic contrast. Consider your content and brand voice.

What unit should I use?

rem is recommended – it's relative to the root font size, making it easy to scale the whole page. px is absolute, and em is relative to the parent element.

How do I use the generated CSS?

Copy the CSS into your stylesheet. The :root variable defines the base font size. Apply the classes or element styles as needed.

📝 Version History

Version 1.0.0 – Initial release

April 14, 2025
  • 🚀 Base font size slider (8‑32px)
  • 🎛️ 6 modular scale ratios
  • 📊 Adjustable steps (3‑6 heading sizes + small text)
  • 📏 Unit selector (rem, px, em)
  • 🎨 Text color picker
  • 👁️ Live preview with all scale levels
  • 📋 CSS output & download

🧠 Why Use a Modular Scale?

A modular scale brings mathematical harmony to your typography. Instead of guessing sizes, you use a consistent ratio, creating visual rhythm and a professional, cohesive look. It's a staple of modern web design.

📐 Consistency

All sizes are mathematically related – no arbitrary numbers.

⚡ Responsive

Using rem units, the whole scale scales proportionally.

🎨 Brand identity

Choose a ratio that matches your brand's personality.

🛠️ Recommended Typography Resources

Tools to master modular scales