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.
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.