Spacing Scale Generator
Preview spacing tokens by name and multiplier, then export CSS, Tailwind config or SCSS.
design-system-spacingLOCAL WORKSPACE
Enabling local controls…
Settings
Separate names and multipliers with commas. rem values assume a 16px root font.
Results
| Name | × | px | rem | Visual |
|---|---|---|---|---|
| 3xs | 0.5 | 2 | 0.125 | |
| 2xs | 1 | 4 | 0.25 | |
| xs | 2 | 8 | 0.5 | |
| sm | 3 | 12 | 0.75 | |
| md | 4 | 16 | 1 | |
| lg | 5 | 20 | 1.25 | |
| xl | 6 | 24 | 1.5 | |
| 2xl | 8 | 32 | 2 | |
| 3xl | 10 | 40 | 2.5 | |
| 4xl | 12 | 48 | 3 | |
| 5xl | 16 | 64 | 4 | |
| 6xl | 20 | 80 | 5 |
CSS
:root {
--spacing-3xs: 0.125rem;
--spacing-2xs: 0.25rem;
--spacing-xs: 0.5rem;
--spacing-sm: 0.75rem;
--spacing-md: 1rem;
--spacing-lg: 1.25rem;
--spacing-xl: 1.5rem;
--spacing-2xl: 2rem;
--spacing-3xl: 2.5rem;
--spacing-4xl: 3rem;
--spacing-5xl: 4rem;
--spacing-6xl: 5rem;
}How to use this tool
Choose a preset or edit the controls. Copy the result or download it when it is ready.
When not to use it
The rem value assumes a 16px root. The Tailwind export uses a CommonJS configuration file.