📏 CSS Unit Converter - EM/PX/REM

Real-time EM⇄PX and REM⇄PX bidirectional conversion with customizable base font size. Includes reference tables for EM, PX, and REM. Essential for responsive frontend development.

CSS Unit Converter — one-click EM to PX, PX to EM, REM to PX, and PX to REM conversion. Customizable base font size (default 16px). Includes handy reference tables. Essential for frontend developers.

EM⇄PXREM⇄PXReferenceReal-time

⚙️ Base Settings

📐 EM → PX

1em × 16px = 16px
⇄
-
0.5em = ?px
-
0.75em = ?px
-
1em = ?px
-
1.5em = ?px
-
2em = ?px

CSS Unit Conversion: EM, PX, and REM Explained

PX (pixels) is an absolute unit — 1px always equals one physical screen pixel. Best for borders, shadows, and precise dimensions.
EM is a relative unit based on the current element's font-size. Nested elements compound, making EM ideal for component-level scaling.
REM (Root EM) is a relative unit based on the root element's (html) font-size, unaffected by nesting. Perfect for global responsive layouts.
Formula: EM × parent font-size = PX, REM × root font-size = PX, PX ÷ parent font-size = EM.

❓ About CSS Unit Conversion

What's the difference between EM and REM?

EM is relative to the parent element's font-size — nesting compounds (e.g., nested lists scale up each level). REM is relative to the root element's (html) font-size — consistent everywhere. Modern CSS recommends REM for global spacing and typography, and EM for component-level local scaling.

Why is the default base size 16px?

Browsers default to 16px (1rem = 16px). If you set html { font-size: 62.5% } (10px), then 1rem = 10px for easier math. This tool supports custom base sizes — use the 10px button for quick switching.

Is this tool free?

Yes, the CSS Unit Converter is completely free with no signup required. All calculations run locally in your browser — your data is never uploaded to any server.

What conversion directions are supported?

EM→PX, PX→EM, REM→PX, and PX→REM — four directions total. Click the swap button to quickly reverse direction. Also includes EM/PX/REM reference tables at a glance.