PX to EM Converter
Convert pixels to em based on a parent font-size. em is a font-relative CSS unit, so the result scales with whatever base size you set.
Parent/root font-size the relative unit is measured against.
Result
1em
Formula
em = px ÷ base font-size (default 16px)Conversion table
px → em at base font-size (px) = 16.
About the PX to EM conversion
The em is a font-relative CSS unit: 1em equals the font-size of the element’s parent. Because it is relative rather than absolute, em lets you build layouts that scale with the user’s text size — a core requirement for accessible, responsive email and web design.
To convert px to em you divide the pixel value by the base font-size. With the browser default of 16px, 16px becomes 1em, 24px becomes 1.5em, and 8px becomes 0.5em. Change the base to match the font-size on the element you are styling and the em output updates live.
Use this px to em converter when you are migrating a fixed pixel design to a fluid, accessible one, or when a design system mandates em-based spacing and typography.