EM to PX Converter

EM is a unit of measurement in CSS (Cascading Style Sheets) used to specify the size of text. It is a relative unit, based on the font-size of the parent element.

Result:

Conversion options:

How to Use PX to EM Converter

  1. Enter base value
  2. Enter the value in EM that you want to convert

What is EM and PX?

In CSS, em and px are both units of measurement used to specify the size of text. The main difference between the two is that an em is a relative unit, while a px is an absolute unit.

An em is based on the font-size of the parent element. For example, if the font-size of the parent element is 16px, then 1em is equal to 16px. If the font-size of the parent element is changed, then the size of text specified in em units will also change.

A px, on the other hand, is a fixed unit of measurement. The size of text specified in px units will not change, regardless of the font-size of the parent element.

In general, it's recommended to use relative units like em for font-size, and absolute units like px for layout (such as width, height, padding and margin).

EM to PX formula

The formula for converting EM to PX is: PX = EM * the root font size in PX.

For example, if the root font size is 16 PX, then 1 EM = 16 PX.

Here are a few more examples of the EM to PX formula:

  • If the root font size is 16 PX, then 0.5 EM = 8 PX, 1.5 EM = 24 PX, and 2 EM = 32 PX.
  • If the root font size is 12 PX, then 1 EM = 12 PX, and 2 EM = 24 PX.
  • If the root font size is 20 PX, then 0.75 EM = 15 PX, 1.5 EM = 30 PX, and 2 EM = 40 PX.

Note: The root font size can be changed in CSS using the font-size property.

Em to Pixels Conversion Table

Web developers and designers typically use certain units of measurement. For example:

EM PX
0,25em 4px
0,375em 6px
0,5em 8px
0,625em 10px
0,75em 12px
0,875em 14px
1em 16px
1,125em 18px
1,25em 20px
1,375em 22px
1,5em 24px
1,625em 26px
1,75em 28px
1,875em 30px
2em 32px
4em 64px
6,25em 100px
8em 128px
12,5em 200px
15,625em 250px
16em 256px
18,75em 300px
25em 400px
31,25em 500px
37,5em 600px
43,75em 700px
50em 800px
62,5em 1000px
75em 1200px