12px to em
At the default 16px root font size, 12px is commonly used for captions, labels and helper text.
12px =
0.75em
How the conversion works
CSS unit conversions assume a default root font size of 16px (the browser default), where 1rem = 16px and 1em = 16px in a default context. Points use the CSS reference of 96dpi, so 1pt = 1.3333px. That makes 12px equal to 0.75em.
The formula is: em = px ÷ 16.
When to use em
em units are relative to the current element’s font size, which makes them ideal for spacing that should scale with a component’s own text — padding inside a button, for example. Be aware that em compounds when nested.
Quick reference: px to em
Convert any value between px, rem, em and pt.
Open the CSS Unit Converter