Fluid Typography Scale Calculator - Online clamp() Generator
Define min and max font sizes and viewport widths. Generate a complete fluid type scale using CSS clamp() for all headings.
UD5 Toolkit
Test clamp(), min(), max() in real-time with visual preview
clamp() is a CSS math function that clamps a value between an upper and lower bound. It takes three parameters: MIN, PREFERRED, and MAX. The function resolves to the preferred value as long as it stays between the min and max boundaries. If the preferred value drops below the minimum, it returns the minimum. If it exceeds the maximum, it returns the maximum. This is incredibly useful for responsive design — for example, clamp(1rem, 2vw + 0.5rem, 2rem) creates fluid typography that scales with the viewport but never goes below 1rem or above 2rem.
min() selects the smallest value from its arguments, while max() selects the largest. These are extremely useful for responsive layouts. For instance, width: min(100%, 600px) ensures an element never exceeds 600px but can shrink on smaller screens. Conversely, width: max(300px, 50%) guarantees a minimum width of 300px while allowing growth on larger screens. Both functions can accept two or more comma-separated values with mixed units.
px, rem, em with relative units like vw, vh, %, and even other functions like calc(). For example: clamp(280px, 40vw, 900px) mixes pixels with viewport width. The browser handles the conversion automatically. This makes them incredibly powerful for creating fluid, responsive designs without media queries.
font-size: clamp(1rem, 2.5vw, 2rem) — text scales smoothly between screen sizeswidth: clamp(300px, 50vw, 800px) — content area adapts fluidlywidth: min(100%, 1200px) — full-width on mobile, capped on desktoppadding: max(16px, 3vw) — ensures breathing room on all devicesheight: clamp(200px, 30vh, 500px) — hero images that adapt to viewport heightmin(), max(), and clamp() enjoy excellent browser support. They are supported in all modern browsers including Chrome (79+), Firefox (75+), Safari (13.1+), and Edge (79+). They've been available since 2019-2020 across major browsers. For older browsers like Internet Explorer, they are not supported, but given IE's end-of-life status, CSS math functions are considered production-ready for virtually all modern web projects.
clamp(MIN, PREF, MAX) is essentially shorthand for max(MIN, min(PREF, MAX)). Both expressions yield identical results, but clamp() is more readable and concise. Use clamp() when you need both a lower and upper boundary. Use standalone min() when you only need an upper limit (e.g., preventing overflow), and standalone max() when you only need a lower limit (e.g., ensuring a minimum clickable area).
calc(). For example: clamp(200px, calc(30vw + 50px), 700px) adds 50px to the viewport-based preferred value. You can also nest them: min(max(300px, 50vw), 800px). This composability makes them extremely flexible for complex responsive behaviors without JavaScript. The browser evaluates nested functions from the inside out, just like in regular programming.
Define min and max font sizes and viewport widths. Generate a complete fluid type scale using CSS clamp() for all headings.
Enter min and max font sizes and viewport widths to generate a perfect CSS clamp() expression. Fluid typography without media queries.
Paste long text and split it into 2, 3, or 4 balanced CSS columns. Preview and copy HTML/CSS. For magazine layouts.
Adjust cocktail ingredient quantities based on desired total volume or number of servings. Preserve classic ratios. Perfect for home bartenders.
Fairly distribute pooled tips among staff based on hours worked or points. Customizable percentages. All calculations local and private.
Calculate how many books, DVDs, or vinyl records fit on a shelf given its length and depth. Useful for home library planning. Local only.
Convert numbers to Roman numerals and decode Roman numerals back to numbers. Supports up to large values. A fun educational tool running entirely in your browser.
Wait for the box to turn green, then tap as fast as possible. Measure milliseconds. Compete with friends.
Generate a horizontal Code‑128 barcode from any string. Download as PNG or SVG. Works offline. For inventory.
Calculate tips and split bills easily. Adjust tip percentage and number of people. Perfect for dining out. All computations happen on your device.
Look at HTTP headers and JavaScript objects to guess which browser extensions might be installed. For awareness.
Enter starting room temp, target temp, and method to see how many minutes to chill your wine perfectly.
Paste a URL or HTML to detect known vulnerable JavaScript library versions. Quick security audit. Client‑side only.
Encode decimal integers into signed magnitude binary representation and decode back. Learn computer arithmetic.
Convert any integer up to 3999 into its Roman numeral representation and vice versa. Quick and accurate. Local.
Convert any date into Roman numerals (day‑month‑year) for tattoos or special occasions. Clean and local.
Convert decimal negative and positive numbers to 8/16/32-bit two's complement binary. Essential for low-level programming.
Paste any JavaScript snippet and get a ready‑to‑drag bookmarklet link. Minify and encode automatically. Pure client.
Convert any date into Roman numerals (day‑month‑year) for tattoos or special occasions. Clean and local.
Paste two JSON objects and see a highlighted diff showing what was added, removed, or changed. For API testing.
Shows live countdown to major holidays and allows custom ones. Visual calendar. Local browser storage.
Enter any date and instantly know which quarter it belongs to. Also shows fiscal quarter if start month set.
Find out what day number of the year any date is (1‑366). Also shows days remaining. Simple reference.
Pomodoro timer that saves completed sessions to localStorage. View daily/weekly stats. Boost productivity with data.
Find equivalent colors across DMC, Anchor, and Madeira embroidery floss brands. Enter a code to see matches. Local reference database.
Convert a Gregorian calendar date to its Julian Day Number and vice versa. Used in astronomy and mainframe computing.
Create complex linear gradients with any number of color stops, exact angles, and length units. Live preview and CSS code.
Style underlines, overlines, and strike-throughs with colors, wavy styles, and thickness. Modern CSS text‑decoration.
Design a fully styled scrollbar with colors, width, radius, and hover effects. Supports both ::-webkit‑scrollbar and Firefox scrollbar‑width.
Create CSS clamp() values for fluid typography. Enter min and max font sizes and viewport widths. Modern responsive design.