PX to EM Converter


An easy to use em to px converter tool for web designers.



px
em


px

Live Preview

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

Sample

SHARE NOW


px


em
8 px to em

px


em
16 px to em

px


em
24 px to em

px


em
30 px to em

px


em
12 px to em

px


em
20 px to em

px


em
28 px to em

px


em
32 px to em

How to Use the converter?

1

Select the input field labeled "EM"

2

Change the number in an input field

3

Converter will automatically convert

What is EM?

In CSS, EM is a relative unit of measurement used for defining font sizes, widths, margins, padding, and other measurements. It is relative to the font size of its parent element or the current element itself (depending on the context). Essentially, 1 em is equal to the current font size.

In CSS, EM is a unit of measurement used to define font sizes and other properties such as margins, padding, and widths. The value of EM is relative to the font size of the parent element or the root element

The term "EM" stands for "relative em", which is a reference to the font size of its parent or the root element.

What is px unit?

A pixel is the smallest unit of an image that can be displayed on a screen. In web development, pixels are used to define the size of an element on a web page.

One pixel is equal to one dot on a computer screen. The size of a pixel is not fixed, and it can vary depending on the device’s screen resolution.

Pixels are commonly used to define the size of images, fonts, and other elements on a web page. When you set the font size of an element to 16px, it means that the text will be displayed in 16 pixels on the screen.

Difference Between EM and PX

Pixels (px)

Pixels (px) are a fixed unit of measurement used in web design. They are based on the resolution of the display, meaning their size remains consistent across different devices and screen sizes. For example, an element set to 100px wide will always be 100 pixels wide, whether it’s viewed on a mobile phone or a large monitor. This makes px a great choice for elements that require precise dimensions, such as images, icons, or fixed layouts. However, since it doesn’t adapt to changes in the user’s browser settings or screen resolution, using pixels can lead to a lack of responsiveness and accessibility in some designs.

EM

EM is a relative unit of measurement that scales based on the font size of the root HTML element (). By default, most browsers set this root size to 16px, so 1em typically equals 16px. What makes em powerful is its ability to create scalable and responsive layouts. When a user changes their browser’s default font size or zoom level, elements using em automatically adjust, ensuring better accessibility and a more flexible design. This makes em ideal for font sizes, padding, margins, and other components that need to respond to various screen sizes and user preferences.

PX to EM Conversion Table (Base: 16px)

PX EM
1px 0.06em
2px 0.13em
3px 0.19em
4px 0.3em
5px 0.31em
6px 0.38em
8px 0.5em
10px 0.625em
12px 0.75em
14px 0.875em
15px 0.94em
16px 1em
18px 1.13em
20px 1.25em
24px 1.5em
25px 1.56em
28px 1.75em
32px 2em
36px 2.25em
40px 2.5em
44px 2.75em
48px 3em
50px 3.13em
56px 3.5em
64px 4em
72px 4.5em
75px 4.69em
80px 5em
90px 5.63em
100px 6.25em