CSS clamp() generator

Generate a responsive CSS value that scales between two viewport widths.

Graphics Stateless

Quick guide

Try an example

You enter

Minimum value (px)
16
Maximum value (px)
32
Small viewport width (px)
400
Large viewport width (px)
1200

You get

clamp(16px, 2vw + 8px, 32px)
How it works and limits

Enter both widths and both values in pixels. Paste the resulting clamp() expression as a CSS property value.