Skip to content
Jellykit

PX to EM

Convert pixels to em units based on the parent element's font size, with common values listed. Free px to em converter for CSS typography and spacing.

Runs in your browser. Nothing is uploaded.

About PX to EM

An em is relative to the font size of the element's parent. Inside a paragraph set at 16px, 1em is 16px. Inside an 20px heading, 1em is 20px.

Enter the pixel value you want and the parent's font size to get the em value. ems are handy for components that should scale as a unit, like buttons whose padding grows with their text.

How to use PX to EM

  1. Enter your values in the fields.
  2. The answer updates instantly as you type.
  3. Press Copy result to save the breakdown.

Frequently asked questions

Why do nested em values get bigger and bigger?

ems compound: 1.2em inside 1.2em is 1.44 times the outer size. Use rem when you want to avoid that.

Is em the same as rem at the top level?

Yes. When the parent is the root element, 1em equals 1rem.

Is PX to EM free and private?

Yes. PX to EM is completely free with no sign-up. Everything runs in your browser, so whatever you type or paste never leaves your device.

See all design tools →