Pixel to REM Converter
Convert pixels to rem using the formula:
REM = Pixel / Base Font Size
Convert pixels to rem using the formula:
REM = Pixel / Base Font Size
REM (Root EM) is a relative unit of measurement in CSS that is based on the font size of the root <html> element. By default, most browsers set the root font size to 16px, but this value can be changed in CSS.
To convert Pixels (px) to REM, use the following formula:
16px ÷ 16 = 1rem32px ÷ 16 = 2rem48px ÷ 16 = 3remIf the base font size is different (e.g., 20px instead of 16px), the formula adjusts accordingly:
40px ÷ 20 = 2rem60px ÷ 20 = 3rem| Pixel | REM |
|---|---|
| 8 px | 0.5 rem |
| 16 px | 1 rem |
| 24 px | 1.5 rem |
| 32 px | 2 rem |
| 40 px | 2.5 rem |
| 48 px | 3 rem |
| 56 px | 3.5 rem |
| 64 px | 4 rem |
| 80 px | 5 rem |
| 96 px | 6 rem |
| 112 px | 7 rem |
| 128 px | 8 rem |
✅ To know more about CSS Units Check out the blog CSS Units Explained: px, em, rem, %, vh, vw, and More.