About This Tool
rem to px reverses the px to rem conversion. Enter rem and the actual root font size to calculate the pixel value locally, helping you understand relative sizes in existing styles.
How to Use
- Enter the rem values you want to convert.
- Enter a Root Font Size greater than 0. The default is 16px.
- View the px result and calculation explanation.
- Copy the result or load an example to check common conversions.
Examples
- 1.5rem × 16px = 24px.
- 2rem × 16px = 32px.
- 1.25rem × 20px = 25px.
How the Calculation Works
px = rem × rootFontSize. The tool shares its conversion function with px to rem and removes insignificant floating-point digits when displaying results. Browsers commonly use a 16px default root font size, but project CSS may change it.
Common Uses
- Compare rem styles with pixel values in a design.
- Understand size changes when a theme changes the root font size.
- Quickly check font sizes, spacing, and container dimensions.
Privacy
All input processing, calculations, CSS generation, and previews run in your browser. Your content is never uploaded. No backend, database, online API, or third-party CDN is used, and your input is not saved automatically.
FAQ
Why isn't 1rem always 16px?
rem uses the root element's actual font size, which project CSS or user settings can change.
Can the root font size be 18 or 20?
Yes. Any valid positive value within the tool's accepted range can be used. It does not have to be 16.
Does browser zoom change this formula?
The formula describes the relationship between CSS pixels and rem. The corresponding physical screen pixels also depend on zoom and device pixel ratio.
Why do some results have no decimal places?
When a result is effectively an integer, the tool removes unnecessary trailing zeros so the output is easy to use directly in CSS.