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.
Explore the new two‑value display syntax like `display: block flex`. See what each inner/outer pair does visually.
Beautify and format your CSS stylesheets instantly. Organize, minify, or prettify CSS code for better readability. Processed securely on client-side.
Make your JavaScript code more readable with this online beautifier. Format and indent JS automatically. Works entirely in your browser, protecting your code privacy.
Test overscroll‑behavior: contain to prevent background scroll or pull‑to‑refresh. See the effect in a live demo.
Enter frame size and image size to calculate mat borders. Visual preview. Precise framing.
Select a ratio (1.25, 1.333, 1.5) and a base size to generate a full typographic scale for h1‑h6. Copy CSS variables.
Design a pure CSS tooltip with custom text, position (top/bottom/left/right), and arrow. Copy the clean code.
Style a drop cap using the initial‑letter property. Set size and sink. Modern alternative to pseudo‑element hacks.
Style a drop cap using the initial‑letter property. Set size and sink. Modern alternative to pseudo‑element hacks.
Select your racquet head size, string type, and play style to get a recommended tension range. Find your sweet spot.
Design a fully styled scrollbar with colors, width, and border radius. Get the CSS for Chrome and Firefox.
Apply user‑select: none, text, all and see how it affects selection. Copy the CSS snippet for your UI elements.
Type JavaScript expressions and see output like a real browser console. Supports console.log, error, warn. Use for quick testing without DevTools.
Enter your clay's shrinkage rate and the desired fired size to determine the wet dimensions you need to throw or slab build. Essential for functional ware.
Add N business days to a date, skipping weekends and optionally entering custom holidays. Regional presets.
Calculate resistor values for transistor fixed bias or voltage divider configuration. Quick quiescent point analysis.
Calculate tips and split bills easily. Adjust tip percentage and number of people. Perfect for dining out. All computations happen on your device.
Calculate how many books, DVDs, or vinyl records fit on a shelf given its length and depth. Useful for home library planning. Local only.
Compute Poisson probabilities for a given mean rate. Ideal for call centers, traffic analysis. Instant chart.
Enter two Unix timestamps and get the exact difference in days, hours, minutes, and seconds. Quick time debugging.
Paste long text and split it into 2, 3, or 4 balanced CSS columns. Preview and copy HTML/CSS. For magazine layouts.
Set a short timer with a themed emoji animation (e.g., pizza cooking). A playful visual countdown.
A visual guide to common copy‑editing and proofreading symbols. Click a mark to see its meaning. For writers.
Animate elements as they enter and exit the viewport using view() timeline. Parallax and reveal effects without JS.
Toggle OpenType features like liga, smcp, tnum, and see the text update. Support for variable fonts. Typography nerds.
Connect a game controller and see every button press, axis movement, and vibration test. Uses the Gamepad API.
Find what day of the week any past or future date falls on. Uses Zeller’s congruence. Fun historical reference tool.
Emojis are scrambled; you must reorder them to form the correct phrase or title. Fun word play.