Enter a size and the grid unit (8px by default) to get the nearest multiple and the values just below and above it. A spacing scale of 1× to 12× the unit is listed in px and rem.
8 is the usual base; 4 for finer steps.
Nearest
24px
3 × 8
Round down
24px
Round up
32px
Spacing scale on a 8px grid
| Step | Pixels | rem (16px root) |
|---|---|---|
| 1× | 8px | 0.5rem |
| 2× | 16px | 1rem |
| 3× | 24px | 1.5rem |
| 4× | 32px | 2rem |
| 5× | 40px | 2.5rem |
| 6× | 48px | 3rem |
| 7× | 56px | 3.5rem |
| 8× | 64px | 4rem |
| 9× | 72px | 4.5rem |
| 10× | 80px | 5rem |
| 11× | 88px | 5.5rem |
| 12× | 96px | 6rem |
Nearest, lower and higher grid value
8px, 4px or any grid unit
Tells you when a size is already on the grid
Spacing scale from 1× to 12×
Scale values in px and rem
Keep paddings, margins and component heights on an 8-point grid so layouts line up.
Round odd sizes from a mock-up, like 27px, to the grid value developers should use.
Generate a spacing scale for a CSS or Tailwind theme.
A mock-up has a card with 27px padding and a 45px tall button on an 8px grid.
Related: PX to REM Converter, Golden Ratio Calculator, Viewport Unit Calculator.
CSS Minifier
Minify CSS to reduce file size
Color Converter
Convert color formats
Aspect Ratio Calculator
Find an image ratio, or crop or pad to 1:1, 4:5, 9:16, 16:9
Unit Converter
Convert length, weight, temperature, area, volume, speed, data and time units
Spacing Scale Generator
Spacing tokens from a 4px or 8px unit as CSS variables, Tailwind or JSON
JSON Formatter
Format and validate JSON
JSON Sort Keys
Alphabetize JSON keys at every level
JSON Flatten
Nested JSON to dot-path keys
JSON Unflatten
Dot-path keys back to nested JSON
Built by Edesy
Edesy builds AI products for Indian businesses. Start self-serve, no demo call needed.
AI agents that answer and make phone calls 24/7. Handle appointments, inquiries and support in Indian and global languages.
₹50 free credit. No demo call needed.