Design
px to rem Converter
Convert CSS values both ways between px and rem using a configurable root font size.
px ↔ rem converter
Convert CSS lengths using a configurable root font size.
- 1Input
- 2Run
- 3Result
Processed on this device
Result
Your result will appear here.
Examples
- At a 16px root: 24px → 1.5rem
- At an 18px root: 2rem → 36px
Accuracy & limitations
- The real rem size depends on the computed font-size of the document root element.
- Browser zoom, operating-system scaling, and user accessibility settings are not reflected.
Frequently asked questions
Why is the default root value 16px?
Many browsers start at 16px, and you can change it to match your project's root setting.
Is em calculated the same way?
No. em may depend on the current element or its parent, so it needs additional context beyond rem.