CSS Units Converter
Convert between pixels, rem, em, percentages, and more
Conversion Type
pixels
This is typically 16px by default in browsers
px
How it works:
- REM – Relative to root element’s font size
- EM – Relative to parent element’s font size
- PX – Absolute pixels
- % – Percentage relative to parent
PX to REM Conversion
1rem
16px ÷ 16 = 1rem
Common Conversions
PX to REM
- 8px 0.5rem
- 16px 1rem
- 24px 1.5rem
- 32px 2rem
REM to PX
- 0.5rem 8px
- 1rem 16px
- 1.5rem 24px
- 2rem 32px
About CSS Units:
- PX (Pixels) are absolute units that appear consistently across devices
- REM (Root EM) are relative to the root element’s font size
- EM are relative to the parent element’s font size
- % (Percentage) units are relative to the parent element’s size
- Using relative units like REM and EM improves accessibility