PX to EM Converter

Convert pixels to em relative to a context font size (16px default). Free CSS converter.

—

How it works

em = px ÷ context font size, em is relative to the current element's font size, not the root

Examples

InputOutput
16 px at 16px context1 em
24 px at 16px context1.5 em
12 px at 12px context1 em

Frequently Asked Questions

What is the difference between em and rem?

em is relative to the current element's (or nearest parent's) font size; rem is always relative to the root. Nested em values compound, rem does not.

What context size should I use?

Use the font size of the parent element the text sits in. When in doubt, 16px (the browser default) is a good estimate.

Why do my em values compound?

Because em inherits, a 1.5em element inside another 1.5em element renders at 2.25× the base. Use rem to avoid compounding.

Related Tools

PX to REM ConverterREM to PX ConverterPX to PT ConverterPT to PX ConverterEM to PX ConverterAspect Ratio Calculator16:9 Aspect Ratio Calculator