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
Generate CSS clamp() functions for fluid typography — no more breakpoints.
The quick brown fox jumps over the lazy dog
clamp() is a CSS function that clamps a value between an upper and lower bound. It takes three parameters: clamp(MIN, PREFERRED, MAX). The function returns the preferred value if it lies between MIN and MAX; otherwise, it returns MIN (if preferred is too small) or MAX (if preferred is too large). For responsive typography, the preferred value typically uses viewport units (vw), allowing font sizes to scale smoothly with screen width without media queries.
Media queries create discrete breakpoints where font sizes "jump" — this can feel jarring. clamp() enables fluid typography that scales continuously between defined limits, providing a smoother reading experience across all screen sizes. It also reduces CSS code and is easier to maintain than multiple @media rules. A single clamp() declaration can replace 3–5 media query blocks.
The linear interpolation formula used is:preferred = minFont + (maxFont − minFont) × (100vw − minViewport) / (maxViewport − minViewport)
This creates a straight-line relationship between viewport width and font size. The slope is (maxFont − minFont) / (maxViewport − minViewport). Our calculator generates a clean CSS calc() expression that browsers evaluate natively.
clamp() is supported in all modern browsers: Chrome 79+, Firefox 75+, Safari 13.1+, and Edge 79+. It has 97%+ global browser support as of 2024. For older browsers, you can provide a fallback by declaring a fixed font size before the clamp() declaration — browsers that don't understand clamp() will ignore it and use the fallback.
Both work well. rem is generally recommended for accessibility because it respects the user's browser font size preference. If a user has set a larger default font size in their browser settings, rem-based values will scale accordingly. px offers more predictable, pixel-perfect control. Many developers use rem for body text and px for headings or decorative text. With our calculator, you can experiment with both units.
Common breakpoints: 320px (small mobile), 768px (tablet), 1024px (small desktop), 1200–1440px (standard desktop), and 1920px (large desktop). A typical fluid typography setup uses 320px as the minimum viewport and 1200px as the maximum. Font sizes stop scaling beyond these limits — clamped at the min below 320px and at the max above 1200px.
Absolutely! clamp() works with any CSS length property. You can use it for line-height, padding, margin, gap, width, and more. For example: padding: clamp(1rem, 3vw, 3rem); creates responsive spacing that scales with the viewport. Fluid spacing combined with fluid typography creates a beautifully responsive design system.
Use our live preview slider above to simulate different viewport widths. For real device testing, use Chrome DevTools' responsive mode (Ctrl+Shift+M / Cmd+Shift+M), which lets you preview at exact device dimensions. You can also use online services like BrowserStack or simply resize your browser window while watching the text scale smoothly.
Define min and max font sizes and viewport widths. Generate a complete fluid type scale using CSS clamp() for all headings.
Write expressions with clamp(), min(), max(), abs(), sign(), round() and see the computed value. Modern CSS calculations.
Calculate how many books, DVDs, or vinyl records fit on a shelf given its length and depth. Useful for home library planning. Local only.
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 tips and split bills easily. Adjust tip percentage and number of people. Perfect for dining out. All computations happen on your device.
Enter starting room temp, target temp, and method to see how many minutes to chill your wine perfectly.
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.
Generate a horizontal Code‑128 barcode from any string. Download as PNG or SVG. Works offline. For inventory.
Convert any integer up to 3999 into its Roman numeral representation and vice versa. Quick and accurate. Local.
Wait for the box to turn green, then tap as fast as possible. Measure milliseconds. Compete with friends.
Convert any date into Roman numerals (day‑month‑year) for tattoos or special occasions. Clean and local.
Convert any date into Roman numerals (day‑month‑year) for tattoos or special occasions. Clean and local.
Look at HTTP headers and JavaScript objects to guess which browser extensions might be installed. For awareness.
Find out what day number of the year any date is (1‑366). Also shows days remaining. Simple reference.
Convert a Gregorian calendar date to its Julian Day Number and vice versa. Used in astronomy and mainframe computing.
Enter any date and instantly know which quarter it belongs to. Also shows fiscal quarter if start month set.
Pomodoro timer that saves completed sessions to localStorage. View daily/weekly stats. Boost productivity with data.
Convert decimal negative and positive numbers to 8/16/32-bit two's complement binary. Essential for low-level programming.
Paste a URL or HTML to detect known vulnerable JavaScript library versions. Quick security audit. Client‑side only.
Shows live countdown to major holidays and allows custom ones. Visual calendar. Local browser storage.
Paste any JavaScript snippet and get a ready‑to‑drag bookmarklet link. Minify and encode automatically. Pure client.
Encode decimal integers into signed magnitude binary representation and decode back. Learn computer arithmetic.
Paste two JSON objects and see a highlighted diff showing what was added, removed, or changed. For API testing.
Find equivalent colors across DMC, Anchor, and Madeira embroidery floss brands. Enter a code to see matches. Local reference database.
Upload an image at multiple widths and generate a complete <picture> or <img srcset> snippet. Modern web performance.
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.