Skip to content
Toolbento

CSS clamp() generator

Build a CSS clamp() for fluid font sizes and spacing that scale between two screen widths.

Everything stays on this device

CSS clamp() generator runs in your browser. The text and files you add are worked on by this device and are never uploaded, to us or to anyone else.

  • No uploads. The page is blocked from sending data to any other server.
  • No account, cookies, ads or tracking.
  • Fonts and scripts come from toolbento.app itself, so the page makes no requests to other companies.
  • Closing the tab clears your text and files from memory.

Read the full details on the privacy page.

CSS

  • Value
    clamp(1rem, 0.8333rem + 0.8333vw, 1.5rem)
  • As a font size
    font-size: clamp(1rem, 0.8333rem + 0.8333vw, 1.5rem);

Preview

Resize the window to see this text grow.

Missing a feature or found a bug in CSS clamp() generator? Tell me on X (@_andrewtran) or by email.

How to use CSS clamp() generator

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

Questions and answers

Is my data sent anywhere?

No. Everything runs in your browser on this device. Nothing you paste is uploaded or stored.

How does the value scale?

In a straight line between the two screen widths. Below the first width it stays at the smallest size, and above the second at the largest.

Why is the result in rem?

So the text still grows when someone raises their browser font size. A value in vw alone would ignore that setting.

Esc

Loading tools