Convert em to pixels with a custom context size (16px default). Instant, free CSS unit converter.
| Input | Output |
|---|---|
| 1 em | 16 px |
| 1.5 em | 24 px |
| 0.875 em | 14 px |
1em equals the context font size, 16px by default. Enter the element's actual font size in the context field for exact results.
Only when the context font size equals the root font size (both 16px). Deeper in the DOM, em values compound while rem stays fixed.
rem for consistent global spacing and type; em for components that should scale with their local context (e.g. button padding).