ADVERT
Clamp() Responsive Font Generator
Build fluid typography with ease. Enter min/max font sizes and viewport breakpoints to produce a precise CSS clamp() font-size formula with live preview.
Font sizing
Viewport breakpoints
Target widths in pixels where the font should hit the min and max sizes.
Live preview
Drag the viewport slider to see how the clamp() value responds.
Responsive typography that scales with clamp()
Generated CSS
font-size: clamp(1.125rem, calc(0.5rem + 0.1736vw), 3rem);Fluid range1.125rem → 3rem
Slope0.1736rem/vw
Intercept0.5rem
Viewport span360px → 1440px
How to use this tool
- Set minimum/maximum font sizes and viewport widths for your scaling range.
- Choose output units (`px` or `rem`) and adjust base size when using rem.
- Preview the result at different widths and copy the generated `font-size` CSS.
Great for
- Building responsive headings that scale smoothly without media queries.
- Translating design-token type ramps into practical production CSS.
- Explaining `clamp()` behavior to teams with a live interactive preview.
Tips
- Align min/max viewport widths with your core layout breakpoints.
- Pick units that match your project token system and accessibility strategy.
- Reuse generated values via custom properties for consistent typography.
FAQ
- When should I use rem instead of px?
- Use rem when you want typography to respect user/browser base font-size preferences.
- What happens if min and max widths are equal?
- The fluid range collapses to a fixed size, so the preview effectively shows a static font-size.
- Can I paste this into utility-first frameworks?
- Yes. The generated `clamp()` value can be used in arbitrary value utilities or custom theme tokens.
ADVERT
ADVERT