New to Rust? Grab our free Rust for Beginners eBook Get it free →
Online REM to PX Converter – Translate CSS Sizes for Real-World Screens

When checking a stylesheet, a rem size can be hard to compare with a CSS-pixel value. The online REM to PX converter multiplies the rem value by the page’s computed root font size to show its CSS-pixel equivalent.
I’ll explain the multiplication and show how to use the converter with the page’s computed root font size.
TL;DR: Multiply rem by the root font size
Multiply the rem value by the root element’s computed font size in CSS pixels to get its CSS-pixel equivalent.
- Formula: CSS px = rem value × root font size in CSS px
- Use the root size for the page you are converting
- A common starting value is 16px, but it is not a fixed rule
What is a rem-to-px conversion?
The rem unit is relative to the computed font size of the document’s root element, usually html. A rem-to-px conversion expresses that relative CSS length as a CSS-pixel value using the root size as its multiplier.
When the root size is 16px, 1rem equals 16 CSS pixels. If the stylesheet sets a different root size, the same rem value resolves to a different number. The result describes a CSS length, not a count of physical pixels on a screen.
| REM value | Root font size | CSS-pixel equivalent |
|---|---|---|
| 1rem | 16px | 16px |
| 1.5rem | 16px | 24px |
| 1.25rem | 18px | 22.5px |
| 2rem | 10px | 20px |
The same rem value resolves differently when the root size changes. Find html’s computed font size in the stylesheet or developer tools. A child element’s font size does not replace rem’s root reference.
The converter expresses a CSS length in another unit. It does not decide whether px or rem suits a property. That choice depends on whether the value should follow changes to the root font size.
How to use the online REM to PX converter
Set the page’s root size, enter one rem number, then read Pixel (PX) Output.
Step 1: Set the root font size
Find the computed font size for html in the stylesheet or developer tools. If a media query changes the root rule, check the value at the viewport you are targeting. Enter it in Base Font Size (px), and use 16 only when it matches.

Step 2: Enter the rem value
Type one number such as 1.25 in REM Value, then select Convert REM to PX. The form takes one value, not a CSS declaration with several rem measurements.
Step 3: Read and check the pixel result
Read Pixel (PX) Output and compare it with the formula. Keep any decimal in the result. Clear the form before another calculation if needed.
Common errors when converting rem to px
Different root sizes produce different answers. Check the target page’s computed root size before treating 16px as correct.
| Situation | What to check |
|---|---|
| Custom root rule | Use computed html size, not an assumed 16px |
| Percentage root size | Resolve it to computed CSS pixels first |
| Decimal output | Keep the precision the target property needs |
| Pixel output | CSS px is not a physical-pixel count |
Rem follows the root element’s font size. Em follows the relevant element’s font-size context, so nested em values can change with parent typography. A parent size does not replace the root size for rem.
Clear All empties REM and PX Output, then resets Base Font Size to 16. Re-enter a custom value before another conversion.
Empty or non-numeric text shows an error. The current code reads a numeric prefix, so 1.25rem may be read as 1.25. Enter numbers without unit suffixes.
Conclusion: use the page’s root size
Rem-to-px conversion is multiplication, and the root element’s computed font size supplies the multiplier. Check that size before using the result in project CSS.
Treat the output as an equivalent CSS value at this root size, not a recommendation to replace every rem declaration. Keep rem in the stylesheet when the size should continue to follow the root.
For the reverse direction, use CodeForGeek’s PX to REM converter. MDN’s font-size reference explains how root-based font units relate to the html element.
Is 1rem always 16px?
Only when the root element’s computed font size is 16px. Check the page’s root value before converting.
How do I convert rem with a custom root font size?
Multiply the rem value by the computed root font size in CSS pixels, then enter that size in Base Font Size (px).
Can I convert px to rem with this tool?
This page converts rem to px. Use CodeForGeek’s PX to REM converter for the reverse calculation.




