// a sandbox of 822 sharp tools

Every little generator
you keep googling for.

QR, barcodes, bcrypt hashes for PHP, UUIDs, JWT decoders, color palettes — fast, local, no signup. Search the sandbox and start.

Type Scale Generator

Design · tool

Type Scale Generator

Modular font-size scale in px and rem with CSS.

5xl · 61.04pxThe quick brown fox
4xl · 48.83pxThe quick brown fox
3xl · 39.06pxThe quick brown fox
2xl · 31.25pxThe quick brown fox
xl · 25pxThe quick brown fox
lg · 20pxThe quick brown fox
base · 16pxThe quick brown fox
sm · 12.8pxThe quick brown fox
xs · 10.24pxThe quick brown fox
:root {
  --text-xs: 0.64rem; /* 10.24px */
  --text-sm: 0.8rem; /* 12.8px */
  --text-base: 1rem; /* 16px */
  --text-lg: 1.25rem; /* 20px */
  --text-xl: 1.5625rem; /* 25px */
  --text-2xl: 1.9531rem; /* 31.25px */
  --text-3xl: 2.4414rem; /* 39.06px */
  --text-4xl: 3.0518rem; /* 48.83px */
  --text-5xl: 3.8147rem; /* 61.04px */
}
fontSize: {
  'xs': '0.64rem',
  'sm': '0.8rem',
  'base': '1rem',
  'lg': '1.25rem',
  'xl': '1.5625rem',
  '2xl': '1.9531rem',
  '3xl': '2.4414rem',
  '4xl': '3.0518rem',
  '5xl': '3.8147rem',
}

Type Scale Generator: overview

A type scale gives headings and body text harmonious sizes by multiplying a base size by a fixed ratio.

Choose base size and ratio and copy CSS custom properties.

How to use Type Scale Generator

  1. Enter or pick a base size and ratio.
  2. The preview and codes update live.
  3. Copy the value or download the file.

Choosing a ratio

1.2 (minor third) suits dense apps; 1.25 (major third) is a versatile default; 1.333 (perfect fourth) and 1.618 (golden) suit editorial sites.

Use 16px base so 1rem = body text.

Use fewer steps on mobile or clamp() for fluid sizes.

Frequently asked questions

px or rem?

rem respects user font settings.

How many steps?

Usually 2 down and 5–6 up.

Tailwind?

Map the values into theme.fontSize.

What is the Type Scale Generator?

The Type Scale Generator is a free online tool on trysandbox.io. In short: Modular font-size scale in px and rem with CSS. It is part of our design collection and works directly in your web browser on desktop, tablet and phone, with no sign-up, no download and no usage limits.

People usually find this page when searching for terms like type scale, font size, modular scale, typography. Whatever brought you here, the goal is the same: get a correct result quickly, understand what the tool is doing, and know how to use the output with confidence. This guide explains exactly that.

Why use an online Type Scale Generator?

Design tools let you see a visual result while you adjust it, then copy production-ready code or values. Tweaking colors, shadows, gradients and layouts visually is much faster than guessing numbers and refreshing a page.

They also help you stay consistent. When every color, radius and spacing value comes from a deliberate choice, your interface looks more professional and is easier to maintain as it grows.

The Type Scale Generator is designed for web designers, front-end developers, marketers, content creators and anyone styling a website or graphic. You do not need technical knowledge to get started, but advanced users will find the options they need to fine-tune the result.

Common uses for the Type Scale Generator

Here are some of the most common situations where the Type Scale Generator is useful:

  • Generating CSS snippets for buttons, cards, backgrounds and sections
  • Building brand palettes and checking that text stays readable
  • Creating assets such as icons, patterns and favicons
  • Teaching or learning how CSS properties affect appearance
  • Exploring visual styles before committing them to a design system

Step-by-step: getting the best result

Adjust the controls until the preview matches what you want, copy the generated values or code, paste them into your stylesheet or design tool, and check the result in context on a real page.

If the result is not what you expected, change one option at a time and compare. Small adjustments are easier to understand than changing everything at once, and you will quickly learn which settings matter most for type scale generator tasks.

Tips and best practices

Follow these recommendations to get reliable, professional results from the Type Scale Generator:

  • Test on both light and dark backgrounds and on small mobile screens.
  • Save values as design tokens or CSS variables instead of repeating raw numbers everywhere.
  • Use effects such as shadows, blur and animation sparingly; subtle usually looks more polished.
  • Check color contrast so text meets accessibility guidelines (WCAG AA needs at least 4.5:1 for normal text).

Mistakes to avoid

Even experienced users run into these problems. Keep them in mind when working with the Type Scale Generator:

  • Choosing colors only by how they look on one monitor without checking contrast.
  • Adding heavy animations that distract users or ignore the reduced-motion preference.
  • Copying generated code without adjusting it to the rest of the site's style.

Privacy and security

Everything is rendered in your browser. No designs or uploaded images are stored on this site, so you can experiment with unreleased brand work safely.

We built trysandbox.io around this principle because utility tools often handle personal or business information. Running the Type Scale Generator locally means faster results, no waiting for uploads and no risk of your input being stored on someone else's server.

Type Scale Generator: frequently asked questions

Do I need to install anything to use the Type Scale Generator? No. It runs in any modern browser, including Chrome, Edge, Firefox and Safari, on Windows, macOS, Linux, Android and iOS. Just open the page and start working.

Does the Type Scale Generator work on mobile? Yes. The layout adapts to small screens, and every control can be used with touch. For long inputs or large files, a laptop or desktop is more comfortable, but the result is the same.

Is my data saved? No. Nothing you enter into the Type Scale Generator is stored on our servers. If you refresh or close the page, your input is cleared, so copy or download your result before leaving.

Can I use the result commercially? Yes. Output you create with the Type Scale Generator is yours to use in personal, client and commercial work. You are responsible for checking that the final result is accurate and suitable for its purpose.

What should I do if something looks wrong? Double-check your input first, then try different options. If the problem continues, contact us through the Contact page with a short description and we will look into it.

Is the Type Scale Generator free?

Yes. The Type Scale Generator is completely free to use, as often as you like, for personal and commercial projects. There is no account, no watermark and no trial period. The site is supported by advertising, which keeps every tool available to everyone.

If you find the Type Scale Generator useful, explore the related tools in the Design category — many tasks combine two or three tools, and they all share the same simple, private, browser-based approach.

// about the sandbox

The small utilities you need,
without the ad-walls.

Most tools process their inputs in your browser. Tools that look up exchange rates, network details or word suggestions use external services; speech features can depend on your browser's services. Each tool's guide explains its purpose and practical limitations.

  • 822tool guides
  • 0accounts
  • 822sharp tools
  • ∞free forever