CSS Type Scale Generator
A modular type scale, fixed or fluid with clamp(), ready as CSS variables. Free, and runs entirely in your browser — nothing is uploaded.
About Type Scale Generator
Builds a modular type scale — each size the one below it multiplied by a ratio — and writes it as CSS custom properties, either as fixed sizes or as fluid clamp() values that grow smoothly between a small and a wide screen.
The ratio sets the character of a design. Small ratios (1.125, 1.2) suit dense interfaces where headings only need to be a little larger than body text; large ones (1.333, 1.5) give editorial pages dramatic headings. The musical names — major third, perfect fourth — come from the intervals the ratios were borrowed from.
Fluid mode is Utopia's method. Each step gets a size on the smallest screen and a size on the widest, with a straight line between: clamp(min, calc(intercept + slope·vw), max). Using a larger ratio on wide screens lets headings grow faster than body text, so small screens stay compact and large ones get real hierarchy, without a single media query.
Where it helps
- Writes fixed or fluid sizes as ready-to-use CSS variables.
- Fluid sizes need no media queries and scale smoothly with the window.
- A different wide-screen ratio gives headings more room exactly where there is space for it.
- Uses rem by default, so a reader's own font-size preference still applies.
- Shows a live specimen of every step.
Limits
- A scale gives sizes, not line heights, weights or spacing — those still need choosing per step.
- Very large ratios produce enormous top steps; trim the steps up rather than using all of them.
- Fluid text can fail WCAG 1.4.4 zoom requirements if the minimum and maximum are far apart; keep the rem term in the middle.
Frequently asked questions
Which ratio should I choose?
For apps and dashboards, 1.125–1.2. For marketing and content sites, 1.25–1.333. Anything above 1.5 is for very large display type. When in doubt, a fluid scale from 1.2 on small screens to 1.25–1.333 on large ones works for most sites.
Why rem instead of px?
rem is relative to the root font size, which the reader can change in their browser settings. Sizes in px ignore that setting, which is an accessibility problem for people who need larger text.
What does the clamp() actually do?
It picks the middle value, a size that grows with the viewport width, but never lets it go below the small-screen size or above the wide-screen one. So text is exactly the minimum on a phone, exactly the maximum on a large monitor, and proportionally in between.
Related tools
- Web Font Previewer — Set your own text in a font file before you ship it
- CSS Unit Converter — px, rem, em, percentages and viewport units, with a preview
- Design Tokens Converter — Turn W3C or Style Dictionary tokens into CSS variables, SCSS, Tailwind or JS
- Color Scale Generator — Turn one colour into an even 50–950 shade scale for CSS, Tailwind or SCSS
- Color Converter — Convert between hex, RGB, HSL, HWB, LAB, OKLCH and more
- Contrast Checker — WCAG contrast ratio for text and UI colours
More Colors & Design tools
- Color Converter — Convert between hex, RGB, HSL, HWB, LAB, OKLCH and more
- Contrast Checker — WCAG contrast ratio for text and UI colours
- Image Colour Picker — Pick a colour out of a picture and read it back
- Gradient Generator — Build linear, radial and conic CSS gradients
- Random Colour Generator — Random colours from a seed you can keep, in a range you choose
- Palette Generator — Harmonious colour schemes from a base colour
- Box Shadow Generator — Design a shadow, stack its layers and copy the CSS
- Border Radius Generator — Round corners evenly, one by one, or into a blob
- CSS Animation Generator — Build a keyframe animation and watch it run
- Cubic Bezier Editor — Plot an easing curve and feel what it does
- Color Scale Generator — Turn one colour into an even 50–950 shade scale for CSS, Tailwind or SCSS
- Color Mixer — Blend two colours in OKLCH, OKLab or sRGB and get the CSS color-mix() for it
- Color Name Finder — The nearest CSS colour names to any colour, and a plain-words description
- Color Blindness Simulator — See a palette as people with each colour-vision deficiency do, and find the pairs that clash
- Image Palette Extractor — Pull the dominant colours out of a picture, with how much of it each covers
- Text Shadow Generator — Soft, glow, neon, outline and retro text shadows with a live preview
- Glassmorphism Generator — Frosted-glass panels with backdrop-filter, a fallback and a live preview
- Clip Path Generator — Cut elements into triangles, hexagons, stars, arrows or your own polygon
- CSS Filter Generator — Build a CSS filter by eye, or find the filter that turns a black icon into any colour
- Design Tokens Converter — Turn W3C or Style Dictionary tokens into CSS variables, SCSS, Tailwind or JS
- Web Font Previewer — Set your own text in a font file before you ship it