〈/〉 TOOLS FOR FRONT-END
PX to Tailwind.
Find the spacing scale value for your Tailwind classes.
Unit converter
Live conversionWorked example
16 px = 4 tw
Current base: 4 px
In Tailwind, --spacing defaults to 0.25rem: 4px with a 16px root font.
px
px
Enter the value to converttw
Automatic, instant conversion=16 px equals4 tw
Examples:
p-4gap-4The scale represents spacing, not font sizes.
EXPLORE, COMPARE, CREATE
Current base: 4 pxConversion table
Common values to speed up your day.
| PX Source value | Tailwind Converted value | Tailwind Reverse conversion | PX Equivalent value |
|---|---|---|---|
| 1 px | 0.25 tw | 0.25 tw | 1 px |
| 2 px | 0.5 tw | 0.5 tw | 2 px |
| 4 px | 1 tw | 1 tw | 4 px |
| 8 px | 2 tw | 2 tw | 8 px |
| 12 px | 3 tw | 3 tw | 12 px |
| 16 px | 4 tw | 4 tw | 16 px |
| 20 px | 5 tw | 5 tw | 20 px |
| 24 px | 6 tw | 6 tw | 24 px |
| 32 px | 8 tw | 8 tw | 32 px |
| 40 px | 10 tw | 10 tw | 40 px |
| 48 px | 12 tw | 12 tw | 48 px |
| 64 px | 16 tw | 16 tw | 64 px |
✦
Less calculating, more creating. Leave the numbers to us.