Design & Color

CSS fluid font size generator

Generate a clamp expression from two viewport widths and font sizes. Use it in your browser, with no account required.

No account needed

Loading tool…

How to use

  1. 1Enter your values and choose the options.
  2. 2Run the tool and review the result.
  3. 3Copy the result or save it as a file.

Good to know

Check the input ranges and units. Your inputs are processed in this browser.

Ads may process connection data. Personalization follows your privacy choices. Privacy (English)

Worked input and output example

These results come from this tool’s actual engine using the sample values below, not your personal input or saved work. Load the example in the tool to inspect the same inputs.

Example input

FieldValue
Minimum font size (px)
16
Maximum font size (px)
32
Minimum viewport width (px)
320
Maximum viewport width (px)
1280

Example result

font-size: clamp(16px, 10.666667px + 1.666667vw, 32px);
Input constraints

These are the actual input validation limits; they are not a guarantee that every accepted value is realistic or that a model applies to your situation.

  • Minimum font size (px): Accepted range: 1 ≤ x ≤ 500
  • Maximum font size (px): Accepted range: 1 ≤ x ≤ 500
  • Minimum viewport width (px): Accepted range: 1 ≤ x ≤ 10,000
  • Maximum viewport width (px): Accepted range: 1 ≤ x ≤ 10,000

Related tools

All tools