clamp() lets a size grow smoothly with the screen width, between a minimum and a maximum, without media queries. Enter the smallest and largest size and the screen widths where growing should start and stop, and copy the clamp() value for font-size, padding, gap, margin, width or border-radius. Drag the preview width to see the size at any screen.
16 unless your site changes html { font-size }
Fluid text
| Screen width | 360 | 768 | 1024 | 1280 | 1440 | 1920 |
|---|---|---|---|---|---|---|
| Size (px) | 16 | 30.2 | 39.1 | 48 | 48 | 48 |
font-size: clamp(1rem, 0.2174rem + 3.4783vw, 3rem);
Calculating runs in your browser. What you type never leaves this device.
For font-size, padding, margin-block, gap, width and border-radius
rem output by default, so text still respects the reader's font size
Handles sizes that shrink as the screen grows
Live preview at any screen width, plus a table at common widths
Copy as CSS, a CSS variable or a Tailwind class
Padding that is comfortable on phones and generous on desktops, in one line.
A hero heading that fills a desktop screen but still fits a phone.
Gaps and widths that scale between breakpoints instead of jumping.
The middle value is a straight line between your two points: slope = (max size - min size) ÷ (max width - min width). It is written as a fixed rem part plus a vw part, for example clamp(1rem, 0.8182rem + 0.9091vw, 1.5rem). Below the first width the size stays at the minimum; above the second, at the maximum.
If the middle value used only vw, zooming the page would not make text bigger, which fails WCAG 1.4.4 (resize text). Mixing rem and vw keeps text responsive to both the screen and the reader's settings.
Responsive Font Size Calculator
Font size for phones and desktops as one CSS clamp() value
Type Scale Generator
Modular or fluid type scales as CSS variables or Tailwind
PX to REM Converter
Pixels to rem and em, and back, for any root font size
Viewport Unit Calculator
vw, vh, vmin and vmax to pixels and back
JSON Formatter
Format and validate JSON
JSON Sort Keys
Alphabetize JSON keys at every level
JSON Flatten
Nested JSON to dot-path keys
JSON Unflatten
Dot-path keys back to nested JSON
Built by Edesy
Edesy builds AI products for Indian businesses. Start self-serve, no demo call needed.
AI agents that answer and make phone calls 24/7. Handle appointments, inquiries and support in Indian and global languages.
₹50 free credit. No demo call needed.