PX to REM Converter

What is REM?

REM (Root EM) is a CSS unit relative to the root element's font size. Unlike pixels, REM scales with the user's browser settings, making it essential for accessible, responsive design. Frontend developers use REM to build layouts that respect user font size preferences and simplify global scaling.

Formula

REM = PX ÷ root font size

With the default 16px root font size: 32px ÷ 16 = 2rem. Change the root font size below if your project uses a different base.

Calculator

1rem = 16px at root font size 16

Common Conversions (base 16px)

PXREM
8px0.5rem
12px0.75rem
14px0.875rem
16px1rem
24px1.5rem
32px2rem

Frequently Asked Questions

How do I convert px to rem?

Divide the pixel value by the root font size. With the default 16px root: 32px ÷ 16 = 2rem. Use the calculator above to convert any value instantly.

What is the default root font size?

Most browsers default to 16px. This means 1rem = 16px. You can change this by setting font-size on the html element in your CSS.

Why should I use rem instead of px in CSS?

REM units scale with the user's root font size preference, improving accessibility. They also make global scaling easy — change one value and all rem-based sizes update proportionally.