Convert between pixels and rem/em for any root font size.
Instant and private in your browser.
How do you convert PX to REM?
rem = px ÷ root font size, and px = rem × root font size; with the default 16px root, 1rem = 16px. For example, at a 16px root, 24px equals 1.5rem. Using rem keeps layouts proportional when users change their browser's default font size, making it more accessible than fixed pixels.
Understanding your result
Using rem keeps layouts proportional when users change their browser’s default font size — better for accessibility than fixed pixels.
Formula and method
rem = px ÷ root font size; px = rem × root font size. With the default 16px root, 1rem = 16px.
Worked example
At a 16px root, 24px equals 1.5rem.
How to use this tool
- Enter a value and choose the direction.
- Set the root font size (16px by default).
- Press Convert.
About the PX to REM Converter
The PX to REM Converter turns pixel values into rem (or em) units and back, based on your root font size, so your CSS scales with the user’s settings.
Explore all Developer Tools tools
Frequently asked questions
What’s the difference between rem and em?
rem is relative to the root font size; em is relative to the current element’s font size. For a 16px root they match at the top level.