Spacing scale generator

A spacing scale is a small set of distances, all multiples of one base unit, used for padding, margins and gaps.

Features

  • Visual rulerSee each step to scale.
  • CSS variablesIn rem units.
  • Runs in your browserNothing is uploaded and no account is needed.

How to use the spacing scale

  1. Enter the base unit.
  2. Review the steps.
  3. Copy the variables.

Why limit the choices

A fixed set removes arbitrary values and makes alignment between components consistent.

Frequently asked questions

4 or 8 points?

8 is common; 4 gives finer control in dense interfaces.

Why rem?

It scales with the user font setting.

Should every value be on the scale?

Nearly all. Borders and hairlines are typical exceptions.

Related tools