Pixel Converter

PX to REM Converter

Convert pixels to rem based on the root font-size. rem is relative to the <html> element, so it stays consistent across your whole document.

Parent/root font-size the relative unit is measured against.

Result

1rem

Formula

rem = px ÷ root font-size (default 16px)

Conversion table

px → rem at base font-size (px) = 16.

pxrem
1px0.0625rem
2px0.125rem
4px0.25rem
8px0.5rem
10px0.625rem
12px0.75rem
14px0.875rem
16px1rem
18px1.125rem
20px1.25rem
24px1.5rem
32px2rem
40px2.5rem
48px3rem
64px4rem
80px5rem
96px6rem
128px8rem

About the PX to REM conversion

The rem (root em) is relative to the font-size of the root <html> element rather than the immediate parent. That single reference point makes rem predictable: there is no compounding as you nest elements, unlike em.

Convert px to rem by dividing the pixel value by the root font-size. At the 16px default, 16px is 1rem, 24px is 1.5rem, and 8px is 0.5rem. If your design system sets the root to a different size, update the base field.

rem is the go-to unit for accessible typography and spacing scales because a single root font-size change resizes the entire UI proportionally.

Related converters

PX to REM Converter FAQs

Divide the pixel value by the root font-size. At the default 16px root, rem = px / 16 — so 16px = 1rem and 32px = 2rem.
rem is always relative to the root <html> font-size, so it never compounds. em is relative to the nearest parent’s font-size, so nested ems multiply. rem is more predictable for global scales.
The browser default is 16px, which this tool uses unless you change it. If your CSS sets html { font-size: ... }, enter that value as the base.
rem respects the user’s browser font-size preference, making layouts more accessible. Changing one root value rescales the whole interface proportionally.