CSS Clamp Generator
Generate a CSS clamp() value for fluid typography: set the min and max size and viewport widths, get the rem plus vw formula and sizes at common screens.
Runs in your browser. Nothing is uploaded.
About CSS Clamp Generator
clamp(min, preferred, max) lets a size grow smoothly with the screen width while never going below the minimum or above the maximum. Enter the size you want on a small screen and a large screen, and the viewport widths where each should apply.
The calculator works out the straight line between those two points, writes it as rem plus vw, and shows the resulting size at 375, 768, 1280 and 1920px wide. Using rem for the fixed part means the size still respects the user's browser font setting.
How to use CSS Clamp Generator
- Enter your values in the fields.
- The answer updates instantly as you type.
- Press Copy result to save the breakdown.
Frequently asked questions
Why rem plus vw rather than just vw?
Pure vw text ignores the user's font size preference and zoom. Adding a rem part keeps it accessible.
Can I use clamp() for spacing too?
Yes. It works for padding, margin, gap and widths, not just font-size.
Is CSS Clamp Generator free and private?
Yes. CSS Clamp Generator is completely free with no sign-up. Everything runs in your browser, so whatever you type or paste never leaves your device.