Responsive Typography Calculator
Build a fully fluid, viewport-driven type system. Set a min/max body size and viewport range and the tool computes the exact rem-based clamp() — with the precise vw slope — then applies fluid clamps across an entire modular scale so every step from sm to 6xl scales on its own. Drag the viewport slider to watch the live specimen resize to the exact computed pixel size, get an accessibility audit (readable floor, rem-vs-px zoom safety), and export to CSS variables, Tailwind v4 @theme, SCSS, or JSON.
About this ToolHow it works, benefits & use casesTap to collapse
A fluid typography calculator built around the one thing most generators get wrong: a precise, rem-based clamp() with the exact viewport (vw) slope. Set a minimum and maximum body size plus the viewport range they apply over, and the tool derives the line through those two points — clamping below the small viewport, clamping above the large one, and scaling linearly in between with no media queries. It then applies fluid clamps across an entire modular scale, so every step from sm to 6xl is independently responsive (and headings can scale harder than body copy on wide screens). The hero is a viewport-width slider: drag it and the specimen text resizes to the exact pixel size the clamp() would render at that width, with the computed value shown live, so the abstract CSS becomes tangible. An accessibility audit checks your readable floor and confirms rem keeps type zoomable, and you can export the whole scale as CSS variables, Tailwind v4 @theme, an SCSS map, or JSON. Every setting is captured in a shareable URL.
How to Use
- 1Set your minimum body size (small screen) and maximum body size (large screen).
- 2Set the min and max viewport widths the type should scale between.
- 3Pick a small-screen and large-screen scale ratio — using a bigger ratio on large screens makes headings grow faster than body copy.
- 4Drag the viewport slider in the live preview to watch specimens resize to the exact computed pixel size at that width.
- 5Read the accessibility audit, then choose a format and copy, download, or share the generated fluid scale.
Key Benefits
- Precise rem-based clamp() with the exact vw slope, verified to hit min/max at the right breakpoints
- A full fluid modular scale — every step from sm to 6xl is responsive, not just one size
- Interactive viewport-width slider that renders specimen text at the exact computed px size
- Separate small-screen and large-screen ratios so headings can scale harder than body copy
- Accessibility audit for the readable size floor and rem-vs-px zoom safety
- Export to CSS variables, Tailwind v4 @theme, SCSS map, or JSON
- Shareable URL captures the full configuration
Common Use Cases
- Replacing a stack of font-size media queries with a single fluid clamp() per step
- Generating a complete, responsive heading-and-body scale for a design system
- Proving to a stakeholder how a headline behaves between a phone and an ultrawide before shipping
- Producing a Tailwind v4 @theme block where each --text-* size is fluid
- Auditing whether a min size and unit choice keep type accessible and zoomable
Live preview
@ 908px- Minimum body size is 16px — at or above the 16px readable floor.
- Sizes are expressed in rem, so they scale with the user’s browser font-size setting and zoom.
- Type scales across a 375px → 1440px viewport range.
CSS variables · 9 responsive steps
:root {
--font-size-sm: clamp(0.8331rem, 0.792rem + 0.1756vw, 0.95rem);
--font-size-base: clamp(1rem, 0.934rem + 0.2817vw, 1.1875rem);
--font-size-lg: clamp(1.2rem, 1.0999rem + 0.4272vw, 1.4844rem);
--font-size-xl: clamp(1.44rem, 1.2937rem + 0.6244vw, 1.8556rem);
--font-size-2xl: clamp(1.7281rem, 1.5199rem + 0.8883vw, 2.3194rem);
--font-size-3xl: clamp(2.0738rem, 1.783rem + 1.2404vw, 2.8994rem);
--font-size-4xl: clamp(2.4881rem, 2.0883rem + 1.7061vw, 3.6238rem);
--font-size-5xl: clamp(2.9863rem, 2.4427rem + 2.3192vw, 4.53rem);
--font-size-6xl: clamp(3.5831rem, 2.851rem + 3.1239vw, 5.6625rem);
}
.text-sm {
font-size: var(--font-size-sm);
line-height: 1.5;
}
.text-base {
font-size: var(--font-size-base);
line-height: 1.4;
}
.text-lg {
font-size: var(--font-size-lg);
line-height: 1.4;
}
.text-xl {
font-size: var(--font-size-xl);
line-height: 1.3;
}
.text-2xl {
font-size: var(--font-size-2xl);
line-height: 1.2;
}
.text-3xl {
font-size: var(--font-size-3xl);
line-height: 1.2;
}
.text-4xl {
font-size: var(--font-size-4xl);
line-height: 1.2;
}
.text-5xl {
font-size: var(--font-size-5xl);
line-height: 1.2;
}
.text-6xl {
font-size: var(--font-size-6xl);
line-height: 1.2;
}
Start from a preset
Base body size
Viewport range
Scale ratios
Each step multiplies by the ratio. Using a larger ratio at the max viewport makes headings grow faster than body copy on wide screens.
Fluid steps
Export format
What “fluid” really means
A fluid size interpolates with the viewport instead of jumping at breakpoints. The generated clamp(min, preferred, max) holds your minimum below the small viewport, your maximum above the large one, and scales linearly in between using an exact vw slope — no media queries needed.
Why rem, not px
The fluid term is emitted in rem so it still scales with a reader’s browser font-size and zoom settings. A px-locked clamp looks identical but quietly breaks that accessibility contract — which is why the audit flags it.
Was this tool helpful?
Share Your Experience
Help others discover this tool!
Related tools
- CSS FormatterFormat and beautify CSS code
- Bundle Analyzer VisualizerPaste a bundle file list to get a visual size treemap, gzip/brotli estimates, performance-budget pass/fail checks, and a build-vs-build diff of what grew or shrank
- CSS Units ConverterConvert any CSS length into all 22 units at once — px, rem, em, %, viewport (vw/vh) and container-query (cqw/cqi) — with adjustable contexts, measured ch/ex, and a true-size ruler
- Bundle Size CalculatorEstimate package sizes and analyze bundle impact on your application
- Container Queries GeneratorDesign CSS @container queries with a live, resizable preview — export CSS, SCSS, and Tailwind v3 + v4
- File Size FormatterConvert any file size across decimal (KB/MB/GB) and binary (KiB/MiB/GiB) units side by side, with exact byte counts and a download-time estimator across 56k → fiber connection speeds
The preferred term is the straight line through (min viewport, min size) and (max viewport, max size). Working in rem, the slope is (maxRem − minRem) / (maxViewportRem − minViewportRem); the constant term is minRem − slope × minViewportRem, and the viewport coefficient is slope × 100 (because 1vw equals one hundredth of the viewport width). That gives clamp(minRem, constant rem + slope×100 vw, maxRem). The tool also resolves the rendered px size at any width so you can verify it hits your min and max exactly at the right viewports.
A static scale gives you fixed sizes — 16px, 20px, 25px — that you then have to wrap in media queries to make responsive. This tool makes every step fluid from the start: each size is a clamp() that interpolates with the viewport on its own, so the whole scale flexes continuously between a phone and a desktop without a single breakpoint.

