PX to EM Converter

Turn pixel values into relative EM units. Pick a base font size, enter your px value, and get the em result for scalable, accessible CSS.

Context your em will scale from
Value in px to convert
0 em

Quick reference

PX to EM conversion

EM = Pixels ÷ base font size. Use a base (often 16px) and divide your pixel value by it. The result scales with the parent element.

When to use em

  • Component-level typography and spacing that should scale with a parent
  • Accessible layouts where users change font size
  • Consistent ratios inside a module without hard-coded px

Limitations

EM compounds when nested. If a parent is 1.2em and the child is 1.5em, the child is 1.2 × 1.5 relative to the root. For root-relative sizing, use rem and convert with our PX to REM converter.