Spacing calculator
Convert between px and rem, and generate a consistent spacing scale on a 4 or 8 pixel system as CSS and Tailwind variables.
In your browser
How to use
- 1Convert any value between px and rem.
- 2Choose the base unit and the progression method.
- 3Copy the variables, Tailwind settings or JSON.
FAQ
Is Spacing calculator free?
Yes, Spacing calculator is completely free and needs no account.
Are my files uploaded to a server?
No. The tool runs entirely inside your browser, and your files and text never leave your device at any point.
Does it work on mobile?
Yes. It works in any modern browser on a phone or computer, with no app to install.
Related tools
Color converterConvert any color between HEX, RGB, HSL and OKLCH, pick it with the color picker, and get its lighter and darker shades.
Gradient generatorDesign linear, radial and conic CSS gradients with multiple colors, and copy ready code for CSS or Tailwind.
CSS shadow generatorDesign a multi-layer box-shadow with a live preview on a card and ready-made templates, and copy the code.
Color contrast checkerCheck the contrast of text color against its background by WCAG standards, and get a suggested color that meets the required level.
Color palette generatorGenerate a harmonious color palette from a base color: complementary, analogous, triadic and monochromatic, with color locking and export.
SVG viewerView SVG files safely with zoom and background change, and convert them to Data URI, Base64, CSS or JSX.