PX to REM Converter
Convert CSS lengths between px, rem, em, pt, %, vw, vh and physical units, using your own base font size and viewport.
PX to REM quick table
Based on a root font size of 16 px.
How the CSS units relate
rem is relative to the root (html) font size — 16 px in most browsers, so 1.5rem = 24 px. em and % are relative to the parent element's font size, which is why they can compound inside nested elements. vw and vh are 1% of the viewport width and height. The absolute units follow the CSS standard: 1 in = 96 px = 72 pt = 6 pc = 2.54 cm.
Using rem for font sizes and spacing lets people who increase their browser's default text size get a layout that scales with it, which helps accessibility.