DevToolPal
EN

CSS units

em to px Converter

Convert em (em) to pixels (px). 1 em = 16 px, and 1 px = 0.0625 em.

Formula

px = em × 16

How to convert

To convert em to pixels, multiply the value by 16. For example, 2 em = 32 px.

Conversion table

em px
0.25 em 4 px
0.5 em 8 px
0.75 em 12 px
0.875 em 14 px
1 em 16 px
1.25 em 20 px
1.5 em 24 px
2 em 32 px
2.5 em 40 px
3 em 48 px
4 em 64 px

The table assumes a base font size of 16px. Change the settings in the converter above to match your project.

About these units

Browsers turn every CSS length into pixels. rem is relative to the root font size and em to the parent element's font size; both are 16px in every major browser unless the page or the user changes it. 1pt is 1/72 inch and 1px is 1/96 inch, so 1pt = 1.333px. vw is 1% of the viewport width, so its pixel size depends on the screen.

FAQ

› How do I convert em to px?

1 em = 16 px. To convert, multiply the value by 16: 2 em = 32 px.

› What is 1 px in em?

1 px = 0.0625 em. The reverse formula is em = px ÷ 16.

› Why use rem instead of px?

rem sizes follow the user's browser font size setting, which helps accessibility, and changing one root value resizes the whole layout consistently.

› What is the difference between rem and em?

rem always uses the root (html) font size. em uses the font size of the element's parent, so nested em values compound.