PX to REM Converter

Convert pixels to rem (and back) using your root font-size. Type either value to get the other instantly — handy for responsive CSS.

CSS
em (same as rem @root)
Tailwind spacing scale (default 1 unit = 0.25rem)

Convert px to rem (and back)

Type a value or pick from the common type scale.

FAQ

How does px to rem work?

rem = pixels ÷ root font size. With the default 16px base, 16px = 1rem and 32px = 2rem.

What base should I use?

Use your root (html) font-size. It is 16px by default in browsers; change it here if your project differs.

What about em?

em is relative to the parent element font-size — shown for reference when converting px.

Last updated: