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
Applied to a card
Spacing tokens set every gap here: padding, the gap between rows, and the space around the buttons.
How to use it
- Pick a base unit
4px gives fine control for product UI; 8px gives fewer, clearer choices.
- Choose how it grows
The common method adds the in-between values teams actually use, like 12 and 20.
- 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.
| Method | Values on a 4px base | Good for |
|---|---|---|
| Common | 2, 4, 8, 12, 16, 20, 24, 32, 40, 48… | Most product UI |
| Linear | 4, 8, 12, 16, 20, 24… | Small, even steps |
| Doubling | 4, 8, 16, 32, 64… | Layouts with few levels |
| Fibonacci | 4, 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.
Our two-week audit turns your real screens into a token plan, a first-components list and a rollout plan.