clamp() calculator

Calculate the ideal viewport-based font size using the clamp() CSS function.
Used for calculation if you work in REM.

Responsive Typography

Resize your browser window width to see the effect.
Current window width: px
Calculated size:

Features

  • Calculate perfect fluid typography using CSS clamp().
  • Support for PX and REM units.
  • Real-time preview of the font scaling.
  • Customizable root font size for REM calculations.
  • Copy-paste ready CSS snippet.

How to Use

  1. Select your preferred unit (Pixels or REM).
  2. Enter the minimum and maximum viewport widths (e.g., 320px to 1200px).
  3. Enter the minimum and maximum font sizes you want at those widths.
  4. Copy the generated font-size: clamp(...) code.