← All tools

PX to REM Converter

Convert px to rem and back at any root font size, see the matching Tailwind spacing and text size, and copy values from a conversion table.

Convert

Tailwind CSS

Spacing step
6 (p-6, gap-6, w-6)
Font size
text-2xl

Tailwind v4 spacing is 0.25rem per step, so p-6 is 1.5rem (24px at a 16px root).

Code

font-size: 1.5rem; /* 24px */

Conversion table (root 16px)

pxremTailwind
1px0.0625rem–
2px0.125remp-0.5
4px0.25remp-1
6px0.375remp-1.5
8px0.5remp-2
10px0.625remp-2.5
12px0.75remtext-xs
14px0.875remtext-sm
16px1remtext-base
18px1.125remtext-lg
20px1.25remtext-xl
24px1.5remtext-2xl
28px1.75remp-7
32px2remp-8
36px2.25remtext-4xl
40px2.5remp-10
44px2.75remp-11
48px3remtext-5xl
56px3.5remp-14
64px4remp-16
72px4.5remtext-7xl
80px5remp-20
96px6remtext-8xl
128px8remtext-9xl

Click a row to copy its rem value.

About the PX to REM Converter

PX to REM Converter turns pixels into rem and rem into pixels at any root font size, shows the matching Tailwind CSS spacing step and text size, and includes a conversion table for common values.

When to use it

Use it when turning a Figma design measured in pixels into accessible, scalable CSS, or when you need to know which Tailwind class matches a size.

More free tools

All tools →