Spacing Scale - Free Online CSS Spacing Generator Tool | IconVault

Build a spacing scale from a base unit and ratio with visual bars. Export CSS variables and a Tailwind theme snippet. Free, runs in your browser.

All tools

Spacing Scale

Consistent spacing, exported as CSS vars

5 of 5 free uses left

Presets

5 of 5 free copies left - runs fully on your device.

space-0
8px / 0.5rem
space-1
12px / 0.75rem
space-2
18px / 1.13rem
space-3
27px / 1.69rem
space-4
40.5px / 2.53rem
space-5
60.75px / 3.8rem
space-6
91.13px / 5.7rem
space-7
136.69px / 8.54rem
space-8
205.03px / 12.81rem
space-9
307.55px / 19.22rem

CSS variables

:root {
  --space-0: 8px; /* 0.5rem */
  --space-1: 12px; /* 0.75rem */
  --space-2: 18px; /* 1.13rem */
  --space-3: 27px; /* 1.69rem */
  --space-4: 40.5px; /* 2.53rem */
  --space-5: 60.75px; /* 3.8rem */
  --space-6: 91.13px; /* 5.7rem */
  --space-7: 136.69px; /* 8.54rem */
  --space-8: 205.03px; /* 12.81rem */
  --space-9: 307.55px; /* 19.22rem */
}

Tailwind theme

// tailwind.config.js
theme: {
  extend: {
    spacing: {
      0: "0.5rem", // 8px
      1: "0.75rem", // 12px
      2: "1.13rem", // 18px
      3: "1.69rem", // 27px
      4: "2.53rem", // 40.5px
      5: "3.8rem", // 60.75px
      6: "5.7rem", // 91.13px
      7: "8.54rem", // 136.69px
      8: "12.81rem", // 205.03px
      9: "19.22rem", // 307.55px
    },
  },
}

About this tool

IconVault's Spacing Scale builds a consistent spacing system from a base pixel unit and a growth ratio. Start from presets like a Tailwind-like scale, the classic 8pt grid, the golden ratio, major third or perfect fourth, or dial in a fully custom geometric scale with your own step count.

Every step is drawn as a visual bar with its px and rem values, and you can copy ready-to-use CSS variables or a Tailwind theme snippet in one click. It is free and runs fully in your browser. It generates the scale values, not the full design system, so token naming and responsive behavior are up to your own conventions.

Frequently asked questions

Popular searches

spacing scale generatorcss spacing scalespacing system generatordesign spacing scale8pt grid generator8 point grid spacingspacing scale calculatorcss variables spacinggenerate spacing tokensdesign token spacingspacing tokens generatortailwind spacing scaletailwind theme spacing generatorcustom tailwind spacingspacing scale cssconsistent spacing web designspacing scale ratiogolden ratio spacingmodular scale spacingmajor third spacing scaleperfect fourth spacinggeometric spacing scalespacing scale px rempx to rem spacing scalemargin padding scalecss margin scalecss padding scalespacing scale for designersui spacing systemdesign system spacingspacing scale figmaspacing scale webflowbootstrap spacing scalematerial design spacing4px grid spacingbase unit spacingspacing scale toolvisual spacing scalespacing scale chartspacing scale previewexport spacing css variablescopy css spacing variablestailwind config spacingspacing scale reactspacing scale vueweb design spacing calculatorfree spacing scale generatoronline spacing scale toolno signup design toolfrontend spacing helpercss helper tool online

More tools

Coming soon

CLI

Coming soon

Figma plugin

Coming soon

VS Code extension

Coming soon

Chrome extension

Coming soon

AI icon generator

Coming soon

Team workspaces

Coming soon

View all 10+ tools →