PX to REM converter

To convert px to rem, divide the pixel value by the root font size: at the browser default of 16px, 24px = 1.5rem and 12px = 0.75rem. Enter any value and base below, or switch to rem → px.

1.5rem at a 16px base

font-size: 1.5rem;

Conversion table (base 16px)

PixelsREM
1px0.0625rem
2px0.125rem
4px0.25rem
6px0.375rem
8px0.5rem
10px0.625rem
12px0.75rem
14px0.875rem
15px0.9375rem
16px1rem
18px1.125rem
20px1.25rem
24px1.5rem
28px1.75rem
30px1.875rem
32px2rem
36px2.25rem
40px2.5rem
48px3rem
56px3.5rem
64px4rem
72px4.5rem
80px5rem
96px6rem
128px8rem

PX to REM conversion table (16px base)

PixelsREM
1px0.0625rem
2px0.125rem
4px0.25rem
6px0.375rem
8px0.5rem
10px0.625rem
12px0.75rem
14px0.875rem
15px0.9375rem
16px1rem
18px1.125rem
20px1.25rem
24px1.5rem
28px1.75rem
30px1.875rem
32px2rem
36px2.25rem
40px2.5rem
48px3rem
56px3.5rem
64px4rem
72px4.5rem
80px5rem
96px6rem
128px8rem

How to convert px to rem

A rem is the root font size of the document. The conversion is one division in each direction:

rem = px ÷ root font size
px  = rem × root font size

24px at a 16px base → 24 ÷ 16 = 1.5rem
1.5rem at a 16px base → 1.5 × 16 = 24px

If a stylesheet sets html { font-size } to something other than the 16px browser default, that value becomes the base and every rem in the document scales with it.

Should you use rem or px?

Use rem for text and spacing that should respect the visitor's browser font-size setting; it is the accessible choice because it scales with the user's preference. Use px for borders, hairlines and other one-pixel details that should not scale.

Related typography tools

Pair the converter with fluid type and real font combinations.

Frequently asked questions

How many px is 1rem?

16px by default. A rem is the root font size of the document, and browsers ship with a 16px root, so 1rem = 16px until a stylesheet changes html { font-size }.

How do I convert 14px to rem?

Divide the pixel value by the root font size: 14 ÷ 16 = 0.875rem at the browser default. At a different base, use the same formula with that base, for example 14 ÷ 10 = 1.4rem.

Does rem follow the browser font size setting?

Yes, when html font-size is not fixed in px. rem units scale with the visitor's browser font-size setting, which is why rem is the accessible choice for text. If a stylesheet pins html { font-size } to a pixel value, rem no longer tracks the setting.

More typography & unit tools

Color tools

Image tools

CSS generators

Image & SVG tools

More free tools

All free tools