PX to EM Converter
Enter pixel values and get the equivalent EM values instantly. Set the parent element font size — default is 16px — and convert single values or a bulk list at once.
Last updated: May 21, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is PX to EM Converter?
EM is a CSS unit relative to the current element's parent font size. Unlike REM (which is always relative to the root), EM cascades — a child element inheriting 1.5em from a parent already at 1.2em gets 1.8em of the root size.
The formula is: **em = px ÷ parent font size**. So 24px at a 16px parent = 1.5em. Use EM for padding, margins, and line-heights when you want them to scale proportionally with the element's own font size.
How to Use PX to EM Converter
Enter one or more px values in the input box (comma or newline separated)
Set the parent element's font size if different from 16px
Copy individual results or the full output
Use the reference table for common px to em lookups
Common Use Cases
- Front-end developers converting design specs from px to EM for scalable typography.
- Developers setting padding and margin in EM so they scale with the element font size.
- Teams migrating legacy px stylesheets to relative units.
- Students learning the difference between EM and REM in CSS.
- Designers handing off measurements in px that developers need as EM values.
- Developers debugging EM cascading issues by checking the pixel equivalent.
Example Input and Output
Convert common design sizes from px to EM at the default 16px parent size.
12
16
24
3212px → 0.75em
16px → 1em
24px → 1.5em
32px → 2emPrivacy
All conversions run in your browser. No data is sent to any server.
Frequently Asked Questions
What is the difference between EM and REM?
EM is relative to the parent element's font size and can compound when nested. REM is always relative to the root (html) element's font size. Use REM for consistent global sizing; use EM when you want sizing to scale with a component's own font size.
Why does my EM value look different in the browser?
EM inherits from its parent, so if the parent has a non-default font size, the computed px value will differ. Set the base here to match your actual parent element's font size for accurate conversion.
When should I use EM instead of REM?
Use EM for values that should scale relative to a component's font size — like padding, line-height, or icon sizes. Use REM for global spacing and type scales that should be consistent regardless of nesting.
Related Tools
EM to PX Converter
Convert EM values to pixels instantly. Set the parent element font size, enter one or multiple EM values, and get the pixel equivalent with a full reference table.
PX to REM Converter
Convert pixel values to REM units instantly. Set your base font size, enter one or multiple px values, and get the REM equivalent with a full reference table.
REM to PX Converter
Convert REM values to pixels instantly. Set your base font size, enter one or multiple REM values, and get the pixel equivalent with a full reference table.
PX to Percent Converter
Convert pixel values to CSS percentage units. Set the parent element size, enter one or multiple px values, and get the percentage equivalent with a full reference table.
Percent to PX Converter
Convert CSS percentage values to pixels. Set the parent element size, enter one or multiple percent values, and get the pixel equivalent with a full reference table.
CSS Validator
Validate CSS syntax online. Checks for unclosed braces, missing colons, empty rules, and invalid property/value pairs using CSS.supports().

