Use our EM to PX Converter for accurate CSS units conversion. Simplify your web design and ensure responsive, scalable typography.
EM to Pixels (PX)
We’re assuming the standard default browser font-size of 16px
| EM | Pixels |
| 0.01em | 0.16px |
| 0.03em | 0.48px |
| 0.05em | 0.8px |
| 0.08em | 1.28px |
| 0.1em | 1.6px |
| 0.15em | 2.4px |
| 0.2em | 3.2px |
| 0.5em | 8px |
| 1em | 16px |
| 2em | 32px |
| 3em | 48px |
| 4em | 64px |
| 5em | 80px |
| 6em | 96px |
| 8em | 128px |
| 10em | 160px |
| 15em | 240px |
| 20em | 320px |
| 30em | 480px |
| 40em | 640px |
| 50em | 800px |
| 60em | 960px |
| 80em | 1280px |
| 100em | 1600px |
Pixels (PX) to EM
| Pixels | EM |
| 1px | 0.0625em |
| 2px | 0.125em |
| 3px | 0.1875em |
| 4px | 0.25em |
| 5px | 0.3125em |
| 6px | 0.375em |
| 8px | 0.5em |
| 10px | 0.625em |
| 12px | 0.75em |
| 14px | 0.875em |
| 15px | 0.9375em |
| 16px | 1em |
| 18px | 1.125em |
| 20px | 1.25em |
| 24px | 1.5em |
| 25px | 1.5625em |
| 28px | 1.75em |
| 32px | 2em |
| 36px | 2.25em |
| 40px | 2.5em |
| 44px | 2.75em |
| 48px | 3em |
| 50px | 3.125em |
| 56px | 3.5em |
| 64px | 4em |
| 72px | 4.5em |
| 75px | 4.6875em |
| 80px | 5em |
| 90px | 5.625em |
| 100px | 6.25em |
An EM to PX Converter is a CSS unit calculator that converts a relative em value into its equivalent pixel figure using a stated base font size, rather than applying a flat multiplier the way generic length converters do.
Designers and developers reach for it when a design file specifies pixels but the underlying stylesheet is built on relative typography, checking each result against whatever font size the parent element actually resolves to at runtime.
WebAIM’s 2018 survey of users with low vision found that only 8% of respondents had increased their browser’s default text size, the exact behavior that em-based sizing accommodates automatically and fixed pixel values ignore entirely.
What Is Em to Px Conversion?
Em to px conversion turns a relative em value into a fixed pixel number, based on whatever font size the browser is currently using as its reference point.
It sits inside CSS as a calculation, not as a separate property or file format.
The unit only makes sense in context. An em value on its own says nothing until you know what font size it’s being measured against.
What em to px conversion is not:
- A CSS property you write directly into a stylesheet
- A fixed ratio that stays the same across every element
- A percentage-based calculation, despite the visual similarity
Developers reach for this conversion constantly while writing CSS, usually when a design file specifies pixels but the stylesheet is built around relative sizing.
Plenty of beginners also pause on what the px abbreviation actually stands for before they even get to the math, since it gives no obvious hint that it’s tied to screen rendering rather than print.
What Is the Difference Between Em and Rem?
Em reads the font size of the parent element, while rem always reads the font size of the root html element, so nested components behave nothing like site-wide typography.
Anyone who wants the deeper mechanics of how the em unit works in CSS will find the same parent-relative behavior driving every em to px calculation on this page.
Key difference: em compounds through nesting, rem does not.
| Unit | Inherits From | Compounding Risk | Typical Use |
|---|---|---|---|
| em | Parent element’s font size | High in deep nesting | Component-level spacing |
| rem | Root html font size | None | Site-wide typography |
| px | Nothing (absolute) | None | Fixed borders, icons |
Web Almanac 2022 data from HTTP Archive shows em still outnumbers rem, accounting for 79.9% of font-relative length unit occurrences against rem’s 19.5%.
The full em vs rem comparison matters most in nested components, where an em value multiplies against every ancestor’s font size on its way down the tree.
What Determines the Base Font Size in Em to Px Conversion?
The base font size is whatever font-size value the parent element resolves to, and every em value in that context multiplies against that single number.
Two sources set this number: a developer’s own CSS rule, or the browser’s built-in default when nothing else is declared.
User-Defined Base Font Size
Setting font-size anywhere in the cascade, from the html element down to a single component, overrides whatever base value existed above it.
- Declared once on html, it becomes the reference point for every rem value on the page
- Declared on a parent element, it becomes the reference point only for em values inside that element
Design systems and frameworks lean on this heavily. Bootstrap and similar toolkits set a root font size early in their stylesheets specifically so every downstream em and rem calculation stays predictable.
Browser Default Font Size
16 pixels is the number nearly every modern browser falls back to when no font size has been set anywhere in the stylesheet.
Chrome, Firefox, Safari, and Edge all ship with this same default, which is why so many code examples assume 1em equals 16px without stating it outright.
Web Almanac 2022 data indicates px still dominates as the actual declared value for font-size, appearing on 71% of pages, with em used on 15% and rem on 6%.
How Do You Calculate Em to Px?
Multiply the em value by the base font size in pixels, and the result is the equivalent px value: em × base font size = px.
At the common 16px base, 1em equals 16px, 1.5em equals 24px, and 2em equals 32px.
Key figures at a 16px base:
- 0.5em = 8px
- 1em = 16px
- 1.5em = 24px
- 2em = 32px
- 2.5em = 40px
The same formula applies no matter which property carries the em value, whether it’s font-size, padding, or a border width.
If the finished layout also needs to work on paper, converting the pixel result to points is a separate step. A dedicated pixel-to-point conversion handles that without forcing the em math to account for print units at all.
Rounding and Decimal Precision
Browsers don’t always land on a whole number. An em value like 0.9375em against a 16px base produces exactly 15px, but plenty of design-driven ratios produce long decimals instead.
Sub-pixel rendering handles most of this quietly. Modern browsers render fractional pixel values through anti-aliasing rather than rounding to the nearest whole pixel before painting.
- Design handoff tools typically round to the nearest whole pixel for readability
- Build tools and preprocessors often keep the decimal intact for accuracy
Rounding direction rarely matters at typical font sizes, but it compounds the same way nested em values do, which is the next problem worth untangling.
How Does Nested Em Inheritance Change the Converted Pixel Value?
Each nested element with an em value multiplies against its own parent’s already-computed font size, not against the root or the original base value.
That means the same 1.2em declaration can produce completely different pixel results depending on how deep it sits in the markup.
Three levels of nesting, one 1.2em value repeated:
- Level 1 (16px base): 1.2em = 19.2px
- Level 2 (19.2px parent): 1.2em = 23.04px
- Level 3 (23.04px parent): 1.2em = 27.65px
Nothing about the CSS changed between those three levels. Only the position in the tree did.
This compounding is the most common reason em-based type looks fine on a shallow page and grows unpredictably once components start nesting inside each other.
Does Browser Zoom Change Em to Px Conversion?
Yes. Browser zoom and text-only resizing scale em-based values because both adjust the font size that em is measured against, while fixed pixel values stay the same size regardless.
This single behavior is why the choice between em and px carries real consequences for web accessibility, not just visual preference.
Browser Zoom Behavior
Full-page zoom scales everything, layout included, so em and px behave almost identically under it.
Text-only resize is where the difference shows up. It changes the font size without touching the layout, so em-based spacing grows along with the text while px-based spacing stays put.
- Em-based padding grows with the text, keeping proportions intact
- Px-based padding stays fixed, which can crowd or clip enlarged text
Text Resize and Accessibility Standards
200% is the threshold that matters here.
W3C’s WCAG 2.1 Success Criterion 1.4.4 requires that text can be resized up to 200% without losing content or functionality, and pages that lean on px for font sizing tend to fail this check first.
Getting responsive typography right from the start avoids retrofitting these fixes later, since em and rem-based type scales along with the resize by default.
Fixed px sizing doesn’t break automatically, but it puts the burden of compliance on manual testing rather than on the unit itself.
When Should You Use Em Instead of Px?
Use em when a value should scale with its own component’s type size, and use px when a value needs to stay exactly the same no matter what surrounds it.
Padding, margin, and line-height inside a button or card component are the classic em candidates, since they should grow or shrink along with that component’s font size.
Common Use Cases for Em
Component-relative sizing is where em earns its keep.
- Padding and margin inside buttons, cards, and badges
- Line-height tied to a component’s own font size
- Icon sizing that should scale with adjacent text
Any component built this way keeps its proportions intact even if a parent later overrides the font size.
Common Use Cases for Px
Fixed, predictable sizing is where px wins instead.
- Border widths, box shadows, and hairline dividers
- Icon and logo dimensions that must not distort
- Breakpoint values in media queries
Web Almanac 2022 data backs this up. Breakpoints are still overwhelmingly declared in pixels, with the first em-based breakpoint value not appearing until the 78th spot on the popularity list.
Pros and cons at a glance:
Em pros: scales with component context, respects user font size preferences, keeps proportions consistent inside reusable components.
Em cons: compounds unpredictably in deep nesting, harder to reason about at a glance, easy to misuse outside component-level styling.
Px pros: predictable, exact, simple to reason about for borders and fixed elements.
Px cons: ignores user font size preferences, can break accessibility compliance, doesn’t scale with responsive design patterns.
Modern layouts increasingly split the difference with fluid formulas. A clamp-based sizing calculator lets a value scale between a minimum and maximum without committing to a single fixed unit at all.
How Do You Convert Em to Px Step by Step?
Convert em to px by identifying the base font size first, then multiplying, then rounding and verifying against the browser’s own computed value.
Skipping the verification step is where most manual conversions go wrong.
- 1. Find the font-size value on the parent element the em is measured against.
- 2. Multiply the em value by that font-size number.
- 3. Round the result if the destination (a design file, a spec document) expects whole pixels.
- 4. Open the browser’s inspector and check the computed value against your manual result.
That last step catches mismatches caused by an inherited font-size nobody accounted for.
Checking the computed value across more than one browser also avoids relying on a single engine’s rounding behavior, which matters for cross-browser compatibility on typography-heavy layouts.
A mismatch almost always traces back to step one. Something upstream set a font-size the developer forgot about.
Which Tools Convert Em to Px Automatically?
Sass and Less offer functions that compute the conversion at build time, PostCSS plugins rewrite the values during the build step, and every browser’s developer tools show the computed pixel result regardless of what unit was written.
Each fits a different point in the workflow: authoring, building, or checking.
Sass and Less Functions
Custom functions handle the math so nobody writes it by hand twice.
- Sass functions typically divide a pixel value by a font-size variable to output rem or em
- Less mixins follow the same pattern using its own division syntax
Sass’s own documentation confirms the plain / operator for division has been deprecated since Dart Sass 1.33.0, and will be removed entirely in Dart Sass 2.0.0, with math.div() as the required replacement.
Any custom px-to-rem function written in Sass, including ones baked into component libraries, needs that update to keep compiling cleanly on newer versions.
PostCSS and Build-Time Conversion
PostCSS plugins rewrite every matching px value in a stylesheet to rem or em during the build, without touching how anyone actually writes the CSS.
The postcss-pxtorem plugin alone sees roughly 111,000 weekly downloads on npm, with its default root value matching the same 16px browsers use natively.
Ant Design Mobile’s own documentation confirms its component styles ship in rem specifically so the same layout renders proportionally across different screen sizes, which is exactly the kind of pipeline these plugins support.
- Runs once at build time, not on every page load
- Leaves the source CSS readable in whichever unit the team prefers to author in
Browser Developer Tools
Every major browser’s inspector shows the final computed pixel value for any element, regardless of which unit the stylesheet declares.
- Chrome and Edge group it under the Computed tab in DevTools
- Firefox shows the same information under its own Computed panel
- Safari surfaces it through the Web Inspector’s Styles sidebar
This is the fastest way to confirm a conversion without redoing the multiplication by hand.
When Does Em to Px Conversion Not Apply?
Em to px conversion doesn’t apply to units that were never font-relative in the first place, and it breaks down wherever no parent font size exists to multiply against.
Three situations sit outside this math entirely:
- Viewport units like vw and vh, which scale against the browser window, not any font size
- Container query units like cqw and cqi, which scale against a containing element’s dimensions instead
- Print stylesheets, where physical units like pt and in have historically been the default choice
Viewport-based units run on a completely separate calculation, tied to window dimensions rather than any font-size chain.
Media queries test the viewport as a whole, while container queries test an individual container, which is why the two rarely share the same sizing math.
Caniuse data cited by developer Josh W. Comeau puts global browser support for container queries at roughly 93% as of November 2024, so this exclusion still applies to a real, if shrinking, share of visitors.
Print is the other clear exception. Web Almanac 2022 data from HTTP Archive found only 5% of desktop pages and 4% of mobile pages shipped a dedicated print stylesheet at all, so the em to px chain rarely even gets tested against paper output.
One more case: an element with no resolvable parent font size, such as one detached from the document tree, has nothing to multiply against until it’s attached and a base value resolves.
None of this makes em or px the wrong choice elsewhere on the page. It just marks where the conversion has nothing left to convert.
FAQ on Em To Px Converter
What Is the Difference Between Em and Percentage Units?
Em ties directly to a font size in pixels or points, while percentage scales against whatever dimension a property normally inherits, width, height, or font size. The two often produce matching numbers but resolve through different mechanisms, especially inside flexible layouts.
How Many Pixels Is 1em by Default?
16 pixels is the default value for 1em in every major browser, tied to the standard 16px root font size. Change the base font size anywhere in the cascade and that 1em value changes with it immediately.
Does Em to Px Conversion Differ Between Browsers?
The math stays identical across Chrome, Firefox, Safari, and Edge, since all four follow the same CSS specification for font-relative units. Rendering differences show up in sub-pixel rounding, not in the underlying calculation itself.
What Is the Formula to Convert Rem to Px?
Multiply the rem value by the root element’s font size, not the parent’s: rem × root font size = px. At the common 16px root, 1.5rem always equals 24px, regardless of how deeply nested the element sits.
Can You Convert Em to Px in Figma or Photoshop?
Both tools work natively in pixels, so there’s no em unit inside the canvas to convert. Developers translate em values manually when handing off a design built around relative typography to a pixel-based mockup.
What Should You Check Before Trusting an Em To Px Converter Result?
An Em To Px Converter result deserves confirmation on two points before it enters production CSS: the base font size the calculation assumed, and the value the target browser actually renders once nested inheritance applies.
Three checks belong in this order, not reversed.
- Confirm the base font size first
- Trace nested inheritance second
- Verify the browser’s computed value last
Reversing that order hides the real source of a mismatch, since a wrong computed value can trace back to either earlier step.
W3C’s WCAG 2.1 Success Criterion 1.4.10 sets the outer edge of this tolerance at 400% zoom, requiring layouts to reflow near 320 CSS pixels wide without two-dimensional scrolling. Fixed pixel sizing rarely survives that threshold; em and rem-based values usually do.
Building that resilience into headings and body copy is the next step in accessible typography, once the raw conversion math is settled.
- What is Backend in Web Development? - September 13, 2026
- What is Frontend Development? - September 11, 2026
- How to Make a Button in Figma: Design Best Practices - September 10, 2026


