Coding & Dev
PX to REM Converter
Convert CSS pixel values to rem units based on root font size.
REM units scale relative to the browser root font size, making them essential for accessible, responsive typography. This converter handles bi-directional conversion and common root size configurations.
REM Value
1.5000 rem
- common
- Equivalent: 150% (percent of root)
- base Size
- Root: 16px
Formula and method
REM = PX / Root Size; PX = REM × Root Size
Direct ratio conversion. The default browser root font size is 16px unless overridden in :root CSS.
Worked examples
16px body text
- Value to Convert:
- 16
- Convert:
- PX → REM
- Root Font Size (px):
- 16
REM Value: 1.0000 rem
2rem in a 10px-root system
- Value to Convert:
- 2
- Convert:
- REM → PX
- Root Font Size (px):
- 10
PX Value: 20.0000 px
Assumptions and limits
- Standard browser default 16px root unless changed
This tool provides an educational estimate. Rules, rates and personal circumstances can change the answer. Review the assumptions before relying on a result. Report a correction.
Common mistakes to avoid
- Assuming root font size is always 16px — some design systems use 62.5% root hack (10px) for easier math.
- Mixing em and rem — em is relative to parent element, rem is relative to root.
Frequently asked questions
Why use rem instead of px?
REM units respect the user's browser font size preferences (accessibility setting). Users who set their browser to large fonts will have all rem-based text scale proportionally. Px values are fixed and override user preferences.