How it works
- Step 1
Enter a value.
Type a number in either field and the other one updates instantly.
- Step 2
Set the base or DPI.
Change the base font size or DPI if your project uses a different one.
- Step 3
Copy the result.
Copy the value or CSS, or pick a ready value from the table below.
Free PX to EM converter
em is relative to the font size of the parent element. If a button's text is 16px, 1em inside it is 16px; if the text is 20px, 1em is 20px. That makes em handy for padding and icons that should grow with their own text.
To convert, divide pixels by the parent font size: 18px ÷ 16 = 1.125em. Because em compounds when elements are nested, set the parent size above to the real font size of the element you're styling.
Common values at 16px
Click any value to copy it
Questions people ask
How do I convert px to em?
Divide the pixel value by the parent element's font size. With a 16px parent, 18px ÷ 16 = 1.125em. Set the parent size above to match your element.
Why does em change inside nested elements?
Each em is relative to its parent's font size, so a 1.2em element inside another 1.2em element ends up 1.44 times the base. This compounding is the main reason teams prefer rem for type.
em or rem for padding?
Use em for padding that should scale with the element's own text, like buttons and badges. Use rem for layout spacing that should stay consistent across the page.
What is 1em in px?
1em equals the font size of the parent element. With the browser default, that's 16px.
Last updated: 25 Nov 2026 · Made by the LeadReef team