DevFiddleDevFiddle
HomeToolsSnippetsArticles
Explore tools
Home>Tools>Px to em converter

Px to em converter

Turn pixel values into relative em units, or convert back to pixels. Set your parent font size and keep both fields synchronized in your browser.

px
em
16px equals 1em at a parent size of 16px.

The font size defined on the immediate parent element.

Common sizes
Unlike rem which always refers to root HTML, em cascades. Use em when child components should resize with their parent.
Tip: press Enter in either field to copy the em value.

Common sizes

Based on a parent element font size of 16px.

UsePixelsEmActions
Caption12px0.75em
Small text14px0.875em
Body text16px1em
Large body18px1.125em
Subheading24px1.5em
Heading32px2em
Large heading48px3em
Display64px4em

How it works

1

Set the parent size

Use 16px unless your parent element defines a custom font size.

2

Type a value

Enter pixels or em. The other field updates as you type.

3

Copy the result

Copy the em value with its unit, ready to paste into your CSS.

Questions

More tools

Px to rem converter

Turn pixel values into rem units and back.

Open tool
Px to percent converter

Convert pixel values to percentages and back.

Open tool
Color contrast checker

Check text and background colors against WCAG.

Open tool
About© DevFiddle 2026