Book a call

Spacing scale generator, with radius

Build a spacing scale on a 4px or 8px base, see every step, and try it on a real card before you commit. Add a short radius scale and export both as tokens.

  • Free, no sign-up
  • Runs in your browser
  • Saves as you go
Try an example

Applied to a card

Loan applicationUpdated 2h ago

Spacing tokens set every gap here: padding, the gap between rows, and the space around the buttons.

ApproveReview
Next stepSet up a layout grid

How to use it

  1. Pick a base unit

    4px gives fine control for product UI; 8px gives fewer, clearer choices.

  2. Choose how it grows

    The common method adds the in-between values teams actually use, like 12 and 20.

  3. Try it on the card

    Change padding and gap from the scale, then export spacing and radius together.

4px or 8px?

An 8px base gives fewer, more distinct choices and suits marketing pages and simple apps. A 4px base adds the half-steps (4, 12, 20) that dense product UI needs for icons, tight lists and form controls. Many systems use a 4px base with a scale that mostly lands on multiples of 8.

MethodValues on a 4px baseGood for
Common2, 4, 8, 12, 16, 20, 24, 32, 40, 48…Most product UI
Linear4, 8, 12, 16, 20, 24…Small, even steps
Doubling4, 8, 16, 32, 64…Layouts with few levels
Fibonacci4, 8, 12, 20, 32, 52…Expressive, editorial layouts

Naming spacing tokens

T-shirt names (space-sm, space-md) are easy to read but hard to extend between steps. Multiples (space-4 for 16px on a 4px base) are easy to extend and to reason about. Pixel names (space-16) are the most literal. Pick one and use it everywhere; the scale matters more than the naming.

Questions

Should I use a 4px or 8px spacing system?

4px for dense product UI that needs half-steps like 12px and 20px; 8px for simpler layouts. A 4px base with mostly 8px multiples gives both.

How many spacing tokens do I need?

Usually 10 to 14. Fewer than that and teams invent values; many more and the differences stop being visible.

Should spacing use px or rem?

The export uses rem, so spacing scales with the reader's font-size setting, with the pixel value noted beside each token.

What radius scale should I use?

Four or five steps, plus a full radius for pills and avatars, is enough for most products.

Want this done properly, for your product?

Our two-week audit turns your real screens into a token plan, a first-components list and a rollout plan.

See the audit