CSS clamp() Fluid Size Generator

Make font sizes and spacing that scale smoothly between a small and a large screen, as one clamp() line.

Also called: fluid typography calculator, clamp() calculator.

FreeNo sign-upRuns in your browser
DESIGN

CSS clamp() Fluid Size Generator

Make font sizes and spacing that scale smoothly between a small and a large screen, as one clamp() line.

Runs locally in your browser
Ready. Fill in the fields above, then press Run tool.
Privacy note: this tool runs in your browser, so the text you enter stays on your device.

Find a tool

Loading tools…

Watch: how to use the CSS clamp() Fluid Size Generator (11 seconds)

Recorded on a phone, steps written on screen, no sound.

About the CSS clamp() Fluid Size Generator

Make a font size or spacing that grows smoothly from a smallest size to a largest size between two screen widths, as one CSS clamp() line in rem.

Example: 16 px at 360 px wide up to 24 px at 1280 px wide.

How to use the CSS clamp() Fluid Size Generator

  1. Add your inputFill in smallest size, largest size, at screen width from and up to screen width. An example is already filled in, so you can press Run tool first to see how it works.
  2. Press Run toolThe result appears right under the button.
  3. Copy or download the resultCopy text results with Copy output; when the tool makes a picture or file, use its Download button.

This tool works inside your browser: what you enter stays on your device.

Example

A sample input and the result the CSS clamp() Fluid Size Generator gives for it (produced by the tool itself, not typed by hand).

Smallest size
16
Largest size
24
At screen width from
360
Up to screen width
1280
Root font size
16

Result:

font-size: clamp(1rem, 0.8043rem + 0.8696vw, 1.5rem);

Behaviour: 16px at 360px wide, growing smoothly to 24px at 1280px wide, then it stops.

Good to know

What you need
You type or choose: Smallest size, Largest size, At screen width from, Up to screen width, Root font size
Where it runs
In your browser, on your device.
Cost
Free, no sign-up.

Questions

Why rem?

Rem follows the visitor's font-size setting, which helps accessibility.

Which browsers support clamp()?

All current browsers.

More tools in Design

See all Design tools