How to use the Type Scale Generator
- Set the base size (usually 16 px, your body text) and a ratio — bigger ratios give more contrast between headings.
- Choose how many steps go below (small print, captions) and above (h4 to h1, display).
- Turn on Fluid to use a smaller base and ratio on phones that grow to the desktop scale; drag the screen-width slider to preview.
- Copy the CSS variables, the Tailwind
fontSizeconfig or an SCSS map.
What a modular scale is
A type scale multiplies the base size by the same ratio for every step: with 16 px and 1.25, the steps are 16, 20, 25, 31.25, 39 px… Sizes that share one ratio look related, which is why typographers borrowed ratios from music — the Major Third (1.25), Perfect Fourth (1.333) and Perfect Fifth (1.5) — and the Golden Ratio (1.618).
- Small ratios (1.125–1.2) suit dense interfaces, dashboards and long reading.
- Large ratios (1.333–1.618) suit marketing pages with big, confident headlines.
Fluid type with clamp()
A heading that is perfect on desktop is often too big on a phone. Fluid steps interpolate between a mobile scale and a desktop scale: font-size: clamp(1.5rem, 1.28rem + 0.98vw, 2.44rem) stays at the minimum on small screens, grows linearly with the viewport, and stops at the maximum. Values are in rem, so they still respect the visitor’s browser font-size setting. For single values, see the Clamp Calculator; convert units with PX to REM.
Also searched as: typography scale, modular scale generator, fluid typography generator, font size scale, clamp font size generator, tailwind font size scale, type scale calculator.
Tools that pair well with the Type Scale Generator
- CSS Grid Generator — Set the columns, rows and gap, then drag across cells to make areas like header, sidebar and main.
- CSS Flexbox Generator — See exactly what every flexbox property does: set the direction, wrapping, justify-content, align-items and gap, add or remove items, and click any item to set its flex-grow, shrink, basis, order and align-self.
- Contrast Checker — Enter a text and background color to get the exact WCAG contrast ratio, pass/fail for every level, an APCA score and one-click fixes that keep your hue.
- CSS Animation Generator — Design CSS animations on a real keyframe timeline.