Pixels to EM Converter (px to em)
Pixels to EM Converter (px to em)
Convert pixels (px) into relative EM units for modular UI components, button padding, and typography that scales proportionally with its parent container.
How to use this converter
- Enter the value in Pixels (px) you want to convert.
- Ensure the “From” selector is set to Pixels (px).
- Ensure the “To” selector is set to EM (em).
- The converted typographic value in EM (em) updates instantly in the result box.
Pixels to EM Formula
To convert from pixels to em, use the standard typographic relationship:
Formula:
em = px / 16
Calculation Examples
- Example 1: 12 px = 0.75 em
- Example 2: 16 px = 1 em
- Example 3: 24 px = 1.5 em
- Example 4: 32 px = 2 em
Pixels to EM Conversion Table
| Pixels (px) | EM (em) |
|---|---|
| 8 px | 0.5000 em |
| 12 px | 0.7500 em |
| 14 px | 0.8750 em |
| 16 px | 1.000 em |
| 20 px | 1.250 em |
| 24 px | 1.500 em |
| 32 px | 2.000 em |
| 48 px | 3.000 em |
Frequently Asked Questions
What base font size is used for this calculation?
This calculator uses the universal web browser default root font size of 16 pixels (1rem = 16px). In virtually all web browsers, unstyled body text defaults to 16px unless explicitly configured otherwise in user browser preferences.
What is the difference between REM and EM in CSS?
Both are relative units, but REM is relative to the root <html> element, whereas EM is relative to the immediate parent element. REM prevents unintended cascading compounding effects in nested DOM structures.
How do Points (pt) relate to Pixels (px) on screens?
In standard 96 DPI CSS screen rendering, 1 inch equals 96 pixels and 72 points. Therefore, 1 point equals exactly 96/72 ≈ 1.333 pixels, and 12pt print type renders as 16px on digital displays.