PX to EM Converter

Convert between PX and EM units with customizable base font size

Live Font Size Preview

Hello

Conversion Reference

1 unit equals how many pixels

px

1

pixels

em

16

pixels

CSS Style Properties

Pixels (px)

h1 {
  font-size: 16px;
}

Em (em)

h1 {
  font-size: 16em;
}

About PX to EM Conversion

What is PX?

PX (Pixels) is an absolute unit that represents a fixed size on the screen. It doesn't scale with user preferences or parent elements, making it useful for precise measurements.

What is EM?

EM (em) is a relative CSS unit that is based on the font size of the parent element. It's useful for creating scalable, responsive designs that adapt to parent font sizes and user preferences.

The Conversion Formula

1 EM = Base Font Size (default 16px)

To convert PX to EM: EM = PX ÷ Base Font Size

Unit Conversion Table for PX to EM

PixelEM
4px0.25em
8px0.5em
12px0.75em
16px1em
20px1.25em
24px1.5em
28px1.75em
32px2em
36px2.25em
40px2.5em
44px2.75em
48px3em
52px3.25em
56px3.5em
60px3.75em
64px4em
68px4.25em
72px4.5em
76px4.75em
80px5em
84px5.25em