Each Tailwind unit equals 4px at default root. p-6 = 24px, w-48 = 192px, gap-8 = 32px — look up any class without switching tabs.

Tailwind CSS uses a spacing scale where each unit = 0.25 rem = 4 px (at default 16px root). So p-4 = 1 rem = 16 px, p-8 = 2 rem = 32 px, w-64 = 16 rem = 256 px.
This converter helps developers quickly translate Tailwind spacing values to exact pixel measurements for debugging, design handoff, and documentation.
Tailwind also has special values: 0.5 = 2px, 1.5 = 6px, 2.5 = 10px, 3.5 = 14px, and named sizes like full = 100%, screen = 100vw.
All calculations run locally in your browser — nothing is sent to any server.
Tailwind spacing = value × 0.25 rem. At 16px root: spacing × 4 = pixels.
p-1 = 4px, p-2 = 8px, p-4 = 16px, p-8 = 32px, p-16 = 64px, p-32 = 128px, p-64 = 256px.
Font sizes use different values: text-sm = 14px, text-base = 16px, text-lg = 18px, text-xl = 20px, text-2xl = 24px.
| Tailwind | rem | px (at 16px root) |
|---|---|---|
| 1 | 0.25rem | 4px |
| 4 | 1rem | 16px |
| 8 | 2rem | 32px |
| 16 | 4rem | 64px |
| 64 | 16rem | 256px |
p-4 = 1rem = 16px at the default root font size of 16px. The Tailwind spacing formula is: px = unit × 4. So p-4 = 4 × 4 = 16px, p-8 = 32px, p-12 = 48px.
Each spacing unit = 0.25rem. At 16px root, multiply by 4 to get pixels. p-6 = 6 × 4 = 24px, w-24 = 24 × 4 = 96px, gap-2 = 2 × 4 = 8px. Tailwind also has half-unit values: p-0.5 = 2px, p-1.5 = 6px, p-2.5 = 10px.
Tailwind v3/v4 default breakpoints: sm = 640px, md = 768px, lg = 1024px, xl = 1280px, 2xl = 1536px. These are min-width breakpoints, so md:p-4 applies at 768px and above.
Yes. In tailwind.config.js under theme.spacing (to fully replace the default scale) or theme.extend.spacing (to add new values while keeping defaults). JIT mode in Tailwind v3+ also supports arbitrary values like p-[13px] without config changes.
p-1 = 4px, p-2 = 8px, p-3 = 12px, p-4 = 16px, p-5 = 20px, p-6 = 24px, p-8 = 32px, p-10 = 40px, p-12 = 48px, p-16 = 64px, p-20 = 80px, p-24 = 96px, p-32 = 128px, p-48 = 192px, p-64 = 256px.
Divide the Figma pixel value by 4 to get the Tailwind unit. 32px / 4 = 8, so use p-8 or gap-8 or m-8. If the value does not divide evenly (e.g. 14px), use the closest token (p-3 = 12px or p-4 = 16px) or an arbitrary value: p-[14px].
Tailwind v3 uses rem for all spacing and font sizes internally. 1 unit = 0.25rem. At 16px root: 1 unit = 4px. If you change the root font size, all Tailwind rem values shift accordingly — which is why this converter accepts a custom base size.
Yes. All calculations run in your browser. No data is sent to any server.

Have an idea, found a bug, or want to suggest a feature? Drop us a message – we respond within 24 hours.