Color & Typography

Font Size Scale Generator

Pick a base size and a ratio, and get a consistent modular type scale. Preview every step live, then copy the generated CSS variables or download them. Everything runs in your browser — your input never leaves the page.

Runs in your browser v1.0.0

Build your type scale

live

The size your body text starts from.

Scale preview

live

    Large steps are capped visually so the list stays readable; the value shown is exact.

    Generated CSS

    copy & paste
    
                    

    Paste the block into :root and reference the variables anywhere, for example font-size: var(--font-size-xl);.

    Advanced Root font size for rem conversion

    Used to convert between px and rem. The browser default is 16px.

    How the scale works

    A modular scale multiplies a base size by a ratio for each step: size = base × ratiostep. A small ratio keeps the hierarchy subtle, while a larger ratio spreads headings further from body text. The generator names each step, formats the values, and emits a block of --font-size-* custom properties you can drop straight into your stylesheet. Invalid values are reported inline instead of producing broken CSS.