How to use the Fluid Font Size (clamp) Generator
- Enter the smallest and largest font size.
- Enter the viewport widths where scaling starts and stops.
- Copy the clamp() value.
What does this tool do?
clamp(min, preferred, max) keeps a value between limits. With a preferred value that combines rem and vw, text grows smoothly between two screen sizes instead of jumping at breakpoints.
Why use it?
- Fewer media queries.
- Smooth, consistent typography.
- Accessible rem-based output.
Example
16px at 375px wide to 24px at 1280px wide: font-size: clamp(1rem, 0.7928rem + 0.884vw, 1.5rem);
The formula
Privacy
Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us. There's no account to create and nothing to install.
Last reviewed by the M2Toolkit team.