Skip to content
Developer Tools

CSS Clamp Generator

Create and copy a pixel-based CSS clamp() expression for one fluid responsive value.

Local CSS generation. Define the smallest and largest pixel values plus the viewport range where the value should scale. Your settings are not uploaded or stored.

Use this for a fluid value such as font size or spacing. Below the minimum viewport, CSS keeps the minimum size; above the maximum viewport, it keeps the maximum size.

Generated value

clamp(16px, calc(11.4286px + 1.4286vw), 32px)

Data handling

Storage and export controls

Retention
The tool's working state is kept only while this page is open. Inputs and results are not saved to persistent storage by Got A Tool.
Export
The tool may prepare a result after you run it. It downloads or copies it only when you choose that action.

Advertising and analytics are separate site services. We do not send selected tool input to them. Read the Privacy Policy for details.

How it works

Build a fluid CSS value in three steps

01

Set the size range

Enter the smallest and largest pixel values you want CSS to use.

02

Set the viewport range

Choose the two viewport widths where the value begins and finishes scaling.

03

Copy the expression

Copy the calculated clamp() expression into a stylesheet or component.

Clear limit

A fluid value still needs design review.

This tool creates one pixel-based clamp() expression. It does not select a type scale, assess readability, manage design tokens, create container-query formulas, or test browser support for your project.

Explicit bounds

The output keeps the stated minimum and maximum pixel values.

Calculated middle

The middle expression is calculated from both viewport widths.

Copyable CSS

Copy one complete clamp() value ready for review.

Local processing

Settings and generated CSS remain in the current browser tab.

Keep working