CSS Clamp() Generator

Design Tools

Fluid responsive font sizes with clamp()

FreePrivateInstant
Minimum size (px)
Maximum size (px)
Min screen width (px)
Max screen width (px)
CSS property

Similar tools you may like

History

All history →

CSS Clamp() Generator — at a glance

Make text and spacing scale smoothly between phone and desktop without media queries.

Input
16px → 32px
400px → 1200px
Run
Result
font-size: clamp(1rem, 0.5rem + 2vw, 2rem);

How to use it — step by step

Smallest and largest size, and the screen widths where they should start and stop.

1

Enter your values

Fill in the boxes. Sensible example values are already filled in for you.

2

Generate clamp()

Press the button. The answer is worked out instantly on your device.

3

Read or copy the result

See the big answer and the extra details, then press Copy to keep them.

Pro tips

Small things that make the result better.

✦Use it for headings so they grow gently with the screen.
✦The result uses rem so it respects user font settings.
✦Test it by resizing your browser window.

Quick facts

Fluidno media queries
remaccessible units
5 propertiesfont, padding…
Freeno signup

Frequently Asked Questions

What does clamp() do?+

clamp(min, preferred, max) keeps a value between a minimum and maximum while it changes with the screen width.

Why rem and vw together?+

The rem part is the starting size; the vw part makes it grow as the screen gets wider.

Is my data safe?+

Yes. Everything runs inside your own browser. Your text, files and images are never uploaded to any server.

More Free Tools