Convert pixels (px) to rem or em instantly using the exact CSS formulas.
Enter a pixel value and choose the conversion mode.
Standard CSS conversion formulas:
rem = pixels Γ· root font-size
em = pixels Γ· parent font-size
Default browser font-size is usually 16px.
If the root or parent font-size changes, rem/em values scale automatically.
A pixel (px) is an absolute CSS unit representing a single dot on the screen. Pixels do not scale automatically with font-size changes.
rem is relative to the root (html) font-size, while
em is relative to the parent elementβs font-size.
Rem is preferred for consistent layouts; em is useful for component-based scaling.
| Pixels (px) | Rem (16px base) |
|---|---|
| 8 | 0.5 rem |
| 12 | 0.75 rem |
| 14 | 0.875 rem |
| 16 | 1 rem |
| 20 | 1.25 rem |
| 24 | 1.5 rem |
| 32 | 2 rem |
| 48 | 3 rem |
16 px = 1 rem
24 px = 1.5 rem
32 px = 2 rem
Yes. Rem scales with user font settings, improving accessibility.
Use em when you want elements to scale relative to their parent container.
16px is the default browser root font-size in most environments.