Digital Drive HQ

PX to REM Converter

Convert px to rem (and back) for CSS.

Free · No sign-up · Works in your browser

Common conversions (at 16px root)
pxrem
8px0.5rem
12px0.75rem
14px0.875rem
16px1rem
18px1.125rem
20px1.25rem
24px1.5rem
32px2rem
40px2.5rem
48px3rem
64px4rem

About the PX to REM Converter

Convert px to rem and rem to px free, for responsive, accessible CSS. Set your root font size (16px by default), type a pixel value to get the rem equivalent, or a rem value to get pixels — the conversion is instant and works both ways. Includes a quick reference table of common sizes. Using rem instead of hard-coded pixels lets your whole layout scale with the user's browser font-size setting, which is better for accessibility.

How to use the PX to REM Converter

  1. 1Set your root font size (usually 16px).
  2. 2Enter a px value to get rem, or a rem value to get px.
  3. 3Copy any value from the reference table.

Frequently asked questions

What is 1rem in px?

1rem equals the root font size — 16px by default in every browser, so 1rem = 16px unless you change the root size.

Why use rem instead of px?

rem scales with the user's browser font-size preference, so text and spacing stay proportional and accessible; fixed px ignores that setting.

How do I convert px to rem?

Divide the pixel value by the root font size — 24px ÷ 16 = 1.5rem. This tool does it instantly for any root size.

Related tools