Fluid typography generator
Free, no sign-up · Facts checked 18 Oct 2026
Fluid font sizes for h1 to h6 and body text: watch them grow, copy the CSS.
116 → 24 px · 360–1440 px screens
Your font-sizeclamp(1rem, 0.833rem + 0.741vw, 1.5rem)- Smallest
- 1rem · 16 px
- Largest
- 1.5rem · 24 px
Work it out
From 16 px on 360 px screens to 24 px on 1,440 px screens: clamp(1rem, 0.833rem + 0.741vw, 1.5rem).
- Smallest
- 1rem · 16 px
- Largest
- 1.5rem · 24 px
- Grows between
- 360–1,440 px screens
- Zoom check (WCAG 1.4.4)
- Pass
Guide
What fluid typography does
Older websites changed font sizes in jumps: one size for phones, a bigger one past a breakpoint. Fluid typography grows the text smoothly with the screen instead. One line of CSS does it:
font-size: clamp(1rem, 0.833rem + 0.741vw, 1.5rem);
clamp() takes three values: the smallest size, a preferred size that grows with the screen width (the vw part), and the largest size. The browser uses the preferred size but never goes below the smallest or above the largest. This tool works out the middle value for you, so the text is exactly your smallest size on a 360 px phone and your largest on a 1440 px desktop, and grows in a straight line between.
How the middle value is worked out
Take 16 px on a 360 px screen and 24 px on a 1440 px screen.
- The slope is the growth per pixel of width: (24 − 16) ÷ (1440 − 360) = 0.00741, or 0.741 vw (1 vw is 1% of the screen width).
- The starting point is where that line would meet a zero-width screen: 16 − 0.00741 × 360 = 13.33 px, or 0.833 rem with a 16 px root.
- So the preferred size is 0.833rem + 0.741vw, held between 1rem and 1.5rem.
At 768 px wide, for example, that gives 13.33 + 0.00741 × 768 = 19.0 px.
Why rem, not px
Some visitors set their browser’s base font size larger to read comfortably. Sizes in rem follow that setting; sizes in px ignore it. Mixing rem with vw in the preferred value keeps both screen growth and the visitor’s setting working. That’s why the tool writes rem unless you turn on Units.
The zoom check (WCAG 1.4.4)
WCAG 2.2 success criterion 1.4.4 asks that text can be zoomed to 200%. Fluid text can break this: the vw part doesn’t grow when the visitor zooms, so a size that grows a lot with the screen may not double. A practical rule (Maxwell Barvian, Smashing Magazine, 2023): keep the largest size within 2.5× the smallest, and zoom will work at every width. The tool checks every size and suggests a fix.
A type scale, not just one size
A site needs more than one size: body text, small print, several headings. A type scale makes them all from one base size and a ratio: each step is the previous one multiplied by the ratio. Turn on Type scale and pick a ratio for phones (smaller, like 1.2) and one for desktops (bigger, like 1.25), as the Utopia method does. Headings then grow more than body text on big screens. The tool writes all 8 steps as CSS custom properties (--step-0 and so on), or as Tailwind fontSize entries.
| Ratio | Name | Feels |
|---|---|---|
| 1.125 | Major second | Calm, for dense pages |
| 1.2 | Minor third | Balanced, a good default on phones |
| 1.25 | Major third | Clear headings, a good default on desktops |
| 1.333 | Perfect fourth | Bold, editorial |
| 1.618 | Golden ratio | Dramatic, for landing pages |
Divya’s school website in Kallakurichi
Divya is building a website for a school in Kallakurichi. Most parents open it on phones, but the office staff use a desktop. She sets body text to 16 → 18 px and turns on Type scale with 1.2 on phones and 1.25 on desktops. Her biggest heading, step 5, runs from about 39.8 px on a phone to 54.9 px on a desktop, and it passes the zoom check. She pastes the eight custom properties into her stylesheet and uses font-size: var(--step-0) for paragraphs and var(--step-4) for the page title.
How to use this tool
- Pick a starting set: Minimal, Standard or Expressive.
- Set your smallest and largest screen, or tap a device chip.
- Drag the two handles on each element: the left one is the size on the smallest screen, the right one on the largest. Open an element for exact numbers, or for its own line height and letter spacing.
- Turn on Harmonious scaling to set Heading 1 only; Headings 2 to 6 follow it by one ratio.
- Drag the screen width ruler to watch every size grow, then copy the CSS, custom properties, builder values (one value at a time, for Divi, Elementor and other page builders) or Tailwind config.
Sources
Facts checked 18 Oct 2026W3CUnderstanding Success Criterion 1.4.4: Resize Text (WCAG 2.2) · W3C Web Accessibility Initiative2026
Text must zoom to 200% without loss; viewport units used wrongly fail it (F94). checked 18 Oct 2026
SMASHAddressing Accessibility Concerns With Using Fluid Type · Maxwell Barvian, Smashing Magazine2023
Secondary: the zoom check, a largest size at most 2.5 times the smallest passes 1.4.4. 7 Nov 2023
UTOUtopia fluid type scale calculator · James Gilyead and Trys Mudford (Utopia, Clearleft)2026
Secondary: the method of a base size and a ratio at each screen width, written as clamp() custom properties. checked 18 Oct 2026
Questions
What is CSS clamp() for font size?
A way to let text grow with the screen between a smallest and a largest size: clamp(smallest, preferred, largest). The preferred part uses vw so it follows the screen width.
How do I calculate the clamp() values?
Work out the slope between your two sizes and widths, then where the line starts. The tool does it: 16 px at 360 px to 24 px at 1440 px is clamp(1rem, 0.833rem + 0.741vw, 1.5rem).
Should I use rem or px in clamp()?
rem, so the text still follows the visitor’s own font-size setting. Combine rem with vw in the middle value.
Is fluid typography accessible?
It can be. Keep the largest size within about 2.5× the smallest so text can still be zoomed to 200% (WCAG 1.4.4), and test with real browser zoom.
What is a fluid type scale?
A set of sizes made from one base size and a ratio, each step fluid on its own. Headings grow more than body text on big screens.
How do I use fluid sizes in Tailwind?
Turn on Tailwind and paste the entries into theme.extend.fontSize in tailwind.config, then use classes like text-step-0.