My All ToolsEnglish

All tools / Design tools

CSS clamp() generator

Build fluid font sizes and spacing that scale smoothly between two screen widths.

Open the tool

How to use

  1. Enter the smallest and largest size you want, in pixels.
  2. Enter the screen widths where scaling starts and stops.
  3. Copy the clamp() line into your CSS.

Why My All Tools?

Common questions

Why clamp() instead of media queries?

One line scales smoothly across every screen width, with no jumps between breakpoints.

Why does it use rem?

rem values respect the font size the user chose in their browser, which is better for accessibility.

More free tools

Free to try with a daily guest limit. No account needed, and your data stays in your browser.