clamp() Generator
v1.1Set a size range and a viewport range and get back a fluid clamp() value that interpolates linearly in between, and holds flat outside it.
Runs locally — nothing leaves your browser.
Presets
Inputs
Min viewport (px)
Max viewport (px)
Width tracking
Unit
Min size (px)
Max size (px)
Root font-size (px)
Target property
clamp() output
Breakdown
Grows from 16px to 24px as the viewport grows from 320px to 1280px — gaining 0.83px per 100px of viewport width.
- Slope
- 0.8333vw
- Intercept
- 0.8333rem
- Lower bound
- 1rem
- Upper bound
- 1.5rem
Preview
viewport: 800pxSize: 20px (1.25rem)
Specimen text
Aa Bb Cc
Building a whole type scale? Try Fluid Typography →
Drag the scrubber or the breakpoint markers on the graph — or focus one and use the arrow keys — to preview the computed size at any viewport width. Your inputs are remembered on this device and never leave the tab.