Type Scale Generator
About this tool
About Type Scale Generator
A type scale is a set of font sizes that grow by the same ratio, so headings, body text and captions feel related instead of picked at random. Enter your body size, choose a ratio from the musical presets (minor second through octave, including the golden ratio) or type your own, and decide how many steps you need above and below the base. Every size is shown as a live specimen in the font of your choice with its pixel and rem value and a suggested line height, which tightens as text gets larger. When it looks right, copy the scale as CSS custom properties, a Tailwind v4 @theme block, a Tailwind v3 fontSize config with line heights, or JSON for design tokens. You can switch between rem and px output and set the root size if your project doesn't use 16px. Step names follow the familiar sm, base, lg, xl, 2xl pattern so they drop straight into existing code. Everything is calculated in your browser. Or start from 23 type system templates for SaaS apps, dashboards, landing pages, blogs, magazines, slides and posters.
Built and maintained by Abhi JainUpdated
How to Create a Type Scale
- 1
Set the base size
Enter the base size (your body text, usually 16px) and the root size used for rem.
- 2
Choose a ratio
Pick a scale ratio such as Major third (1.25) or enter a custom ratio, then set the steps above and below the base.
- 3
Check the specimen
Read each step in the specimen, change the preview font and text, and adjust until the hierarchy feels right.
- 4
Copy the code
Switch between CSS variables, Tailwind v4, Tailwind v3 and JSON, choose rem or px, and copy or download.
Type Scale Generator: questions and answers
How is a modular type scale calculated?
Each size is the base size multiplied by the ratio raised to the step number: size = base × ratio^step. With a 16px base and a 1.25 ratio, step 1 is 20px, step 2 is 25px and step −1 is 12.8px.
Which type scale ratio should I use?
Smaller ratios such as 1.125 or 1.2 suit dense interfaces and apps where many levels sit close together. Larger ratios such as 1.333 or 1.5 suit marketing pages and editorial layouts with big, dramatic headings. Many teams use a smaller ratio on mobile and a larger one on desktop.
Should font sizes be in rem or px?
Use rem for font sizes. Rem values follow the visitor's browser font-size setting, so text scales for people who need larger type, while px ignores that preference.
How do I make the scale fluid between screen sizes?
Generate one scale for mobile and one for desktop, then interpolate each step with CSS clamp(). The CSS Clamp Generator builds those clamp() values for you.
What line height should headings use?
Large text needs less line height than body text. This tool suggests 1.5 for body sizes, 1.3 around 20–31px, 1.2 around 32–47px and 1.1 from 48px up, which you can adjust to taste.
Are there type scale presets?
Yes. 23 templates set the base size, ratio, number of steps and preview font for a use: SaaS and admin apps, mobile, design systems and docs, landing pages and e-commerce, blogs, magazines and newsletters, slides and print, plus playful, luxury and monospace looks.
Related Tools
- Spacing Scale GeneratorSpacing tokens on a 4 or 8-pt grid, t-shirt sizes or a ratio, as CSS variables or Tailwind.
- Font ViewerOpen TTF, OTF, WOFF or WOFF2 fonts: specimen, waterfall, glyph map and font info.
- PX to REM ConverterConvert px to rem and back, see a reference table and convert whole stylesheets.
- CSS Clamp GeneratorFluid clamp() values between two viewports for type and spacing.
- Color Palette GeneratorColour harmonies, tints and shades and a 50–950 scale, exported as CSS, Tailwind, JSON or PNG.