PX to REM Converter

rem1.5rem
Pixels
24px
rem / em
1.5
Points (pt)
18pt
Percent of base
150%

rem is relative to the root (html) font size, 16px by default. em is relative to the parent element’s font size, so it equals rem only when the parent uses the root size.

Convert CSS pixel values to rem (and em), or rem back to pixels, using your project’s root font size — 16px by default.

How to use the PX to REM Converter

  1. Choose px → rem or rem → px.
  2. Enter the value.
  3. Set the root font size if it is not 16px.

How it works

rem = px ÷ root font size. With the browser default of 16px, 24px = 1.5rem and 12px = 0.75rem. Using rem for font sizes and spacing respects the user’s browser font-size setting, which improves accessibility. em works the same way but is relative to the parent element’s font size, so nested em values compound.

px to rem at 16px base

pxrempxrem
80.5241.5
100.625281.75
120.75322
140.875362.25
161402.5
181.125483
201.25644

Frequently asked questions

How many px is 1rem?

16px with the default root font size.

What is 24px in rem?

1.5rem at a 16px base.

Should I use rem or px?

rem for font sizes and most spacing, so text scales with user settings; px is fine for borders and hairlines.

What is the difference between rem and em?

rem is relative to the root element; em is relative to the current element’s parent font size.

Related tools