PX to EM Converter

A Free Pixel to EM CSS Unit Converter Tool With The Live Text Preview!

The tool by default does conversions based on the commonly used 16px base font size. But if you want to do conversions for other base font size values, then you can change it above.

Live Preview

Font Size = 0.625em & Base Font Size = 16px

[Sample Text]

How to Use PX to EM Converter?

Enter the pixels value that you want to convert in the Pixels box and the tool will display the calculated em in the EM box (no need to press Enter or click on any buttons for conversions!)

The tool also works vice versa. So, you can do em to px conversions by entering the value in EM box and the tool will display the calculated px value in the Pixels box.

The Live Preview Feature: The tool also shows the live text preview to give you an idea of how big or small the value you are converting is, making web designing a little more convenient for you.

Common PX to EM Conversions

As per base font size - 16px.

PixelsEM
1px0.0625em
2px0.125em
4px0.25em
6px0.375em
8px0.5em
10px0.625em
12px0.75em
14px0.875em
15px0.9375em
16px1em
18px1.125em
20px1.25em
21px1.3125em
22px1.375em
24px1.5em
25px1.5625em
26px1.625em
28px1.75em
30px1.875em
32px2em
PixelsEM
34px2.125em
36px2.25em
38px2.375em
40px2.5em
42px2.625em
44px2.75em
48px3em
50px3.125em
54px3.375em
56px3.5em
64px4em
72px4.5em
96px6em
100px6.25em
120px7.5em
144px9em
168px10.5em
192px12em
216px13.5em
240px15em

To do conversions for other px, em or base font size use the tool above.

Understanding What is EM & How it Works?

EM is a CSS unit that is relative to the font-size of the parent element.

Let's understand it with an example.

Let's say there's a <div> and you have defined the font-size for it to be 16px. Now if you use a <p> tag and give it the size of 1em, then the font-size of <p> would be equivalent to 16px because em is relative css unit to the font-size of the parent element.

Similarly, if the font-size of the <div> would be 20px, then the font-size of <p> would be 20px.

How do you convert PX to EM?

Converting px to em is an easy math. You just have to divide the px value that you want to convert with the base font size a.k.a parent element's font size.

The formula to convert pixels to em:

em = px / base font-size

Example:

Let's say you want to convert 16px to em, then as per the formula above, you've to divide 16 with the base font-size.

Now, if the base font-size is 16px, then 16 divided by 16 is 1.

So, 16px is equals to 1em.

This is how you can convert px to em.

This PX to EM converter tool does calculations using the same formula and allows you to do conversions in much fast and easy way than doing this calculation manually.

RELATED TOOLS: