CSS UNIT CONVERTER
PX to REM.
The right units, without the mental math. Convert pixels and rem in either direction.
Instant conversion
px
rem
Edit either value. Results use up to 3 decimal places.
THE MATH
10px÷16=0.625rem
KEEP IT HANDY
Common conversions
Based on a 16px root. Select a result to copy.
| Pixels | REM |
|---|---|
| 1px | |
| 2px | |
| 4px | |
| 8px | |
| 12px | |
| 14px | |
| 16px | |
| 18px | |
| 20px | |
| 24px | |
| 32px | |
| 40px | |
| 48px | |
| 64px | |
| 96px |
| REM | Pixels |
|---|---|
| 0.063rem | |
| 0.125rem | |
| 0.25rem | |
| 0.5rem | |
| 0.75rem | |
| 0.875rem | |
| 1rem | |
| 1.125rem | |
| 1.25rem | |
| 1.5rem | |
| 2rem | |
| 2.5rem | |
| 3rem | |
| 4rem | |
| 6rem |
01 / THE FORMULA
Pixels divided by the root.
To convert px to rem, divide by the root font size. For example, 24px ÷ 16 = 1.5rem. To go back to pixels, multiply the rem value by the root size.
02 / WHY REM?
One root. Consistent sizing.
Rem units follow the root element’s font size, making a shared scale useful for type, spacing, and layout. Unlike em, rem doesn’t depend on each element’s own font size.
More about this toolCalculated in your browser. No uploads, no account required.