Who this helps
- Developers building responsive typography
- Designers creating fluid spacing tokens
Developer Design Utility
Enter minimum size, maximum size, and viewport range to generate CSS clamp() values for responsive font-size, padding, margin, gap, and more.
Enter minimum and maximum sizes with a viewport range, and the CSS clamp() code will be calculated automatically.
rem output uses 1rem = 16px. A different root font size on your site changes the rendered sizes.
Check how the generated clamp() value changes according to the screen size.
Check responsive CSS values that change naturally with the screen size.
Generate CSS to see the preview and calculated value.
Check the calculated clamp() value and CSS code.
Enter values and click Generate Clamp.
clamp() is especially useful for elements that need fluid size changes in responsive UI.
Set a minimum and maximum size plus the viewport widths where they apply. Generate a clamp() expression for font size or spacing, then inspect the code and current preview calculation.
Enter the minimum and maximum size in px.
Enter the minimum and maximum viewport width.
Choose a CSS property, selector and px or rem output.
Optionally enable a CSS variable, then generate.
Test below, within and above the viewport interval, including zoom and root-font changes.
With a 16px root font, the value is about 48px at a 900px viewport. Coefficients are rounded.
At 787.5px viewport and a 16px root font, padding is about 24px on all four sides.
The value is 20.5px at 600px, and is clamped to 10.5px below 400px and 30.5px above 800px.
Slope is the size difference divided by the viewport difference; multiplying it by 100 gives the vw coefficient. The intercept makes the preferred value meet the lower anchor. Output is rounded to four decimals; rem values use a fixed 16px conversion basis.
Calculations and previews run in browser memory without saving the CSS inputs. Copy includes generated code and explanatory comments.
Check text colors as well as sizes.
Explore fixed corner shapes first.
Only at the 16px conversion basis, subject to rounding. At a 20px root, 2rem is 40px. Test the destination page's actual root font.
This generator requires maximum size greater than minimum size. Decreasing ranges are outside its supported input model.
An invalid range or CSS setting clears the old output. Correct it to regenerate; if automatic copy fails, use the displayed manual-copy field.