EM to PX & VH to PX Converter

Pixels32px
rem (at this base)
2rem
vh
3.556vh
vw
2.222vw
pt
24pt

em is relative to the element’s parent font size; rem to the root; vh/vw to 1% of the viewport height/width.

Convert relative CSS units into pixels. Set the parent font size and viewport size to see exactly how em, rem, vh and vw resolve.

How to use the EM to PX & VH to PX Converter

  1. Enter the value and choose its unit.
  2. Set the parent/root font size (16px default).
  3. Set the viewport width and height for vw/vh.

How it works

  • em = value × the parent element’s font size
  • rem = value × the root (html) font size
  • vh / vw = 1% of the viewport height / width
  • pt = 4/3 px (1pt = 1/72 in, 1px = 1/96 in)

On mobile, 100vh can include the area behind the browser toolbar; newer units like svh and dvh address this.

em to px at 16px

em / rempx
0.58
0.7512
0.87514
116
1.12518
1.2520
1.524
232
2.540
348

Frequently asked questions

How many px is 1em?

16px if the parent font size is the default 16px.

How many px is 100vh?

The full height of the browser viewport, e.g. 900px on a 900px-tall window.

What is 2rem in px?

32px with a 16px root font size.

Should I use em or rem?

rem is easier to predict; em is useful for spacing that should scale with the component’s own font size.

Related tools