Web Development / Development Tools

EM to PX Conversion Tool

Oct 19, 2022
1 min read
EM to PX Converter

EM to Pixel Calculator

This tool allows you to work out the PX size from EM sizes.

Parent font size:
Size in EM:

Result: 0 px.

With a parent font size of 16, the font size in pixels with an em of 0 is 0 px.


What is the parent font size?

The parent font size is the font size of the parent container.

What is an EM?

An EM (Emphemeral Unit) is a unit of measurement relative to the font size of its parent. As such, when the parent font size changes, the size of the child font changes automatically.

For example:

  • If the parent font size is 16 px and the child font is set to 1.5 EM, the child font is 16 x 1.5, or 24 pixels.
  • If the parent font is changed to 20px, then the child font will automatically be 20 x 1.5, or 30 pixels.

How do you convert between EM and PX

You can use the calculator above to calculate the pixel size of a font from an EM value. Alternatively, here is the formula for EM to PX:

Formula: Size in EM * parent font size in pixels

Example: 2em * 16px = 32px