Convert Tailwind CSS spacing units to pixels, where each unit is 0.25rem (4px at the default base). When you see p-8 or gap-12 in markup and need the real pixel size, this resolves it instantly. The table below lists the common Tailwind-to-pixel mappings.
| Tailwind unit | Pixels |
|---|---|
| 1 | 4px |
| 2 | 8px |
| 3 | 12px |
| 4 | 16px |
| 5 | 20px |
| 6 | 24px |
| 8 | 32px |
| 10 | 40px |
| 12 | 48px |
| 16 | 64px |
Multiply the scale unit by 4 (Tailwind's base unit). So w-4 = 4 × 4 = 16px, w-8 = 32px, w-12 = 48px, w-16 = 64px. Fractional values follow the same rule: w-0.5 = 2px, w-1.5 = 6px, w-3.5 = 14px. This calculator does the multiplication for you — type the Tailwind scale number (the part after w-, p-, m-, gap-) and read the pixel value.
Mostly for design handoff and debugging. A designer working in Figma thinks in pixels; a developer using Tailwind thinks in scale units. When a component uses p-6 and the design spec calls for 28px padding, this calculator quickly confirms that p-6 = 24px (so the design and code disagree by 4px). It's also handy when porting Tailwind code to a non-Tailwind framework that needs raw pixel values.
The default scale covers: 0 (0px), 0.5 (2px), 1 (4px), 1.5 (6px), 2 (8px), 2.5 (10px), 3 (12px), 3.5 (14px), 4 (16px), 5 (20px), 6 (24px), 7 (28px), 8 (32px), 9 (36px), 10 (40px), 11 (44px), 12 (48px), 14 (56px), 16 (64px), 20 (80px), 24 (96px), 28 (112px), 32 (128px), 36 (144px), 40 (160px), 44 (176px), 48 (192px), 52 (208px), 56 (224px), 60 (240px), 64 (256px), 72 (288px), 80 (320px), 96 (384px). The reference table below shows the full scale at a glance.
No — this calculator assumes Tailwind's default 4px base. If your project extends or overrides the spacing scale in tailwind.config.js, your custom values won't appear in the reference table. The arithmetic still works (just override the base in the field above), but the named classes in the table reference the default scale only.
Inverse of PX→Tailwind: px = Tailwind units × 4. The full Tailwind v3 scale is displayed in a reference table, mapping each spacing value (0, 0.5, 1, 1.5... 96) to its pixel equivalent. The class name column shows the corresponding w-{n} class. This is useful for developers debugging CSS or translating design specs from Tailwind classes to absolute pixel dimensions.