This is a free online converter which you can use to convert Pixels (px) to em. simply type the Base value and the Pixels (px) value which you want to convert to em and press Convert button!
What is Em and how to convert Px To Em?
Em is a unit used in art of arranging type for measuring lengths.
Em is a Relative unit, which implies that it’s value is comparative with the text size of it’s parent component.
Converting px to em is very simple. As i mentioned above, em is text relative unit, that means 1 em is equivalent to the text size whatever the text size for the parent component.
you can use the following Pixel to EM equation to convert px to em:
em = pixel / text-size (16 is the default value)
for example, if we want to convert 2 pixel to em and the text size is 32, using the above equation: em=2/32=0.0625
Pixels to em Conversion Table if text size (base) is 16
This is a chart for px to em conversion in 16 text-size.
Pixel | Em |
---|---|
1 px | 0.0625 em |
2 px | 0.125 em |
3 px | 0.1875 em |
4 px | 0.25 em |
5 px | 0.3125 em |
6 px | 0.375 em |
7 px | 0.4375 em |
8 px | 0.5 em |
9 px | 0.5625 em |
10 px | 0.625 em |
11 px | 0.6875 em |
12 px | 0.75 em |
13 px | 0.8125 em |
14 px | 0.875 em |
15 px | 0.9375 em |
16 px | 1 em |
17 px | 1.0625 em |
18 px | 1.125 em |
19 px | 1.1875 em |
20 px | 1.25 em |
21 px | 1.3125 em |
22 px | 1.375 em |
23 px | 1.4375 em |
24 px | 1.5 em |
25 px | 1.5625 em |